Module: MountableCms::PagesHelper
- Defined in:
- app/helpers/mountable_cms/pages_helper.rb
Instance Method Summary collapse
Instance Method Details
#handlers ⇒ Object
19 20 21 |
# File 'app/helpers/mountable_cms/pages_helper.rb', line 19 def handlers %w(erb haml) end |
#views(arg = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/mountable_cms/pages_helper.rb', line 4 def views(arg=nil) case arg when String `find #{arg} -type f -o -type l | \ grep -v '/_' | grep -v 'mailer' | grep -v 'tex' | grep -v '~$' | \ sed "s\@#{arg}/@@"`.split when Array arg.map { |path| views(path) }.flatten when nil return @views unless @views.nil? paths = view_paths.map {|vp| vp.instance_variable_get('@path') } @views = views(paths) end end |