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 = {})
Also aliased as: template_exists?
# File actionpack/lib/action_view/lookup_context.rb, line 117
def exists?(name, prefixes = [], partial = false, keys = [], options = {})
  @view_paths.exists?(*args_for_lookup(name, prefixes, partial, keys, options))
end
find(name, prefixes = [], partial = false, keys = [], options = {})
Also aliased as: find_template
# File actionpack/lib/action_view/lookup_context.rb, line 108
def find(name, prefixes = [], partial = false, keys = [], options = {})
  @view_paths.find(*args_for_lookup(name, prefixes, partial, keys, options))
end
find_all(name, prefixes = [], partial = false, keys = [], options = {})
# File actionpack/lib/action_view/lookup_context.rb, line 113
def find_all(name, prefixes = [], partial = false, keys = [], options = {})
  @view_paths.find_all(*args_for_lookup(name, prefixes, partial, keys, options))
end
find_template(name, prefixes = [], partial = false, keys = [], options = {})
template_exists?(name, prefixes = [], partial = false, keys = [], options = {})
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 104
def view_paths=(paths)
  @view_paths = ActionView::PathSet.new(Array.wrap(paths))
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 123
def with_fallbacks
  added_resolvers = 0
  self.class.fallbacks.each do |resolver|
    next if view_paths.include?(resolver)
    view_paths.push(resolver)
    added_resolvers += 1
  end
  yield
ensure
  added_resolvers.times { view_paths.pop }
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 144
def detail_args_for(options)
  return @details, details_key if options.empty? # most common path.
  user_details = @details.merge(options)
  [user_details, DetailsKey.get(user_details)]
end