Module: ActionView::LookupContext::ViewPaths

Defined in:
lib/active_scaffold/extensions/action_view_rendering.rb

Instance Method Summary collapse

Instance Method Details

#find_all_templates(name, partial = false, locals = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/active_scaffold/extensions/action_view_rendering.rb', line 4

def find_all_templates(name, partial = false, locals = {})
  prefixes.collect do |prefix|
    view_paths.collect do |resolver|
      if Rails.version < '3.2.0' # FIXME: remove when rails 3.1 support is dropped
        temp_args = *args_for_lookup(name, [prefix], partial, locals)
      else
        temp_args = *args_for_lookup(name, [prefix], partial, locals, {})
      end
      temp_args[1] = temp_args[1][0]
      resolver.find_all(*temp_args)
    end
  end.flatten!
end