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

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

Class Method Summary collapse

Class Method Details

.additional_blocksObject



22
23
24
25
26
27
28
# File 'lib/redmine/views/my_page/block.rb', line 22

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