Module: Beef::Pages::HelperMethods
- Defined in:
- lib/pages.rb
Instance Method Summary collapse
Instance Method Details
#get_template_names ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pages.rb', line 4 def get_template_names templates = [] Dir.glob("#{RAILS_ROOT}/app/views/pages/templates/*") do |f| match = /\/([^\/]+)\.html\.erb$/.match(f) templates << match[1] unless match.nil? end # Move default to top if it exists if default = templates.delete('default') templates.insert(0, default) end templates end |