Helpers related to template lookup using the lookup context information.

Methods
D
E
F
T
V
W
Attributes
[R] view_paths
Instance Public methods
exists?(name, prefixes = [], partial = false, keys = [], options = {})
This method is also aliased as template_exists?
     # File actionpack/lib/action_view/lookup_context.rb, line 118
118:       def exists?(name, prefixes = [], partial = false, keys = [], options = {})
119:         @view_paths.exists?(*args_for_lookup(name, prefixes, partial, keys, options))
120:       end
find(name, prefixes = [], partial = false, keys = [], options = {})
This method is also aliased as find_template
     # File actionpack/lib/action_view/lookup_context.rb, line 109
109:       def find(name, prefixes = [], partial = false, keys = [], options = {})
110:         @view_paths.find(*args_for_lookup(name, prefixes, partial, keys, options))
111:       end
find_all(name, prefixes = [], partial = false, keys = [], options = {})
     # File actionpack/lib/action_view/lookup_context.rb, line 114
114:       def find_all(name, prefixes = [], partial = false, keys = [], options = {})
115:         @view_paths.find_all(*args_for_lookup(name, prefixes, partial, keys, options))
116:       end
find_template(name, prefixes = [], partial = false, keys = [], options = {})

Alias for find

template_exists?(name, prefixes = [], partial = false, keys = [], options = {})

Alias for exists?

view_paths=(paths)

Whenever setting view paths, makes a copy so we can manipulate then in instance objects as we wish.

     # File actionpack/lib/action_view/lookup_context.rb, line 105
105:       def view_paths=(paths)
106:         @view_paths = ActionView::PathSet.new(Array.wrap(paths))
107:       end
with_fallbacks()

Add fallbacks to the view paths. Useful in cases you are rendering a :file.

     # File actionpack/lib/action_view/lookup_context.rb, line 124
124:       def with_fallbacks
125:         added_resolvers = 0
126:         self.class.fallbacks.each do |resolver|
127:           next if view_paths.include?(resolver)
128:           view_paths.push(resolver)
129:           added_resolvers += 1
130:         end
131:         yield
132:       ensure
133:         added_resolvers.times { view_paths.pop }
134:       end
Instance Protected methods
detail_args_for(options)

Compute details hash and key according to user options (e.g. passed from render).

     # File actionpack/lib/action_view/lookup_context.rb, line 145
145:       def detail_args_for(options)
146:         return @details, details_key if options.empty? # most common path.
147:         user_details = @details.merge(options)
148:         [user_details, DetailsKey.get(user_details)]
149:       end