Module: Redmine::Views::MyPage::Block

Defined in:
lib/redmine/views/my_page/block.rb

Class Method Summary collapse

Class Method Details

.additional_blocksObject


19
20
21
22
23
24
25
# File 'lib/redmine/views/my_page/block.rb', line 19

def self.additional_blocks
  @@additional_blocks ||= Dir.glob("#{RAILS_ROOT}/vendor/plugins/*/app/views/my/blocks/_*.{rhtml,erb}").inject({}) do |h,file|
    name = File.basename(file).split('.').first.gsub(/^_/, '')
    h[name] = name.to_sym
    h
  end
end