# File lib/action_view/lookup_context.rb, line 89
89: def exists?(name, prefix = nil, partial = false)
90: @view_paths.exists?(*args_for_lookup(name, prefix, partial))
91: end
# File lib/action_view/lookup_context.rb, line 80
80: def find(name, prefix = nil, partial = false)
81: @view_paths.find(*args_for_lookup(name, prefix, partial))
82: end
# File lib/action_view/lookup_context.rb, line 85
85: def find_all(name, prefix = nil, partial = false)
86: @view_paths.find_all(*args_for_lookup(name, prefix, partial))
87: end
Whenever setting view paths, makes a copy so we can manipulate then in instance objects as we wish.
# File lib/action_view/lookup_context.rb, line 76
76: def view_paths=(paths)
77: @view_paths = ActionView::Base.process_view_paths(paths)
78: end
Add fallbacks to the view paths. Useful in cases you are rendering a :file.
# File lib/action_view/lookup_context.rb, line 95
95: def with_fallbacks
96: added_resolvers = 0
97: self.class.fallbacks.each do |resolver|
98: next if view_paths.include?(resolver)
99: view_paths.push(resolver)
100: added_resolvers += 1
101: end
102: yield
103: ensure
104: added_resolvers.times { view_paths.pop }
105: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.