Helpers related to template lookup using the lookup context information.

Methods
A
D
E
F
T
W
Attributes
[R] html_fallback_for_js
[R] view_paths
Instance Public methods
any?(name, prefixes = [], partial = false)
Also aliased as: any_templates?
# File actionview/lib/action_view/lookup_context.rb, line 147
def any?(name, prefixes = [], partial = false)
  @view_paths.exists?(*args_for_any(name, prefixes, partial))
end
any_templates?(name, prefixes = [], partial = false)
Alias for: any?
exists?(name, prefixes = [], partial = false, keys = [], **options)
Also aliased as: template_exists?
# File actionview/lib/action_view/lookup_context.rb, line 142
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, find_file
# File actionview/lib/action_view/lookup_context.rb, line 130
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 actionview/lib/action_view/lookup_context.rb, line 138
def find_all(name, prefixes = [], partial = false, keys = [], options = {})
  @view_paths.find_all(*args_for_lookup(name, prefixes, partial, keys, options))
end
find_file(name, prefixes = [], partial = false, keys = [], options = {})
Alias for: find
find_template(name, prefixes = [], partial = false, keys = [], options = {})
Alias for: find
template_exists?(name, prefixes = [], partial = false, keys = [], **options)
Alias for: exists?
with_fallbacks()

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

# File actionview/lib/action_view/lookup_context.rb, line 154
      def with_fallbacks
        view_paths = build_view_paths((@view_paths.paths + self.class.fallbacks).uniq)

        if block_given?
          ActiveSupport::Deprecation.warn <<~eowarn.squish
          Calling `with_fallbacks` with a block is deprecated.  Call methods on
          the lookup context returned by `with_fallbacks` instead.
          eowarn

          begin
            _view_paths = @view_paths
            @view_paths = view_paths
            yield
          ensure
            @view_paths = _view_paths
          end
        else
          ActionView::LookupContext.new(view_paths, @details, @prefixes)
        end
      end
Instance Private methods
detail_args_for(options)

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

# File actionview/lib/action_view/lookup_context.rb, line 189
def detail_args_for(options) # :doc:
  return @details, details_key if options.empty? # most common path.
  user_details = @details.merge(options)

  if @cache
    details_key = DetailsKey.details_cache_key(user_details)
  else
    details_key = nil
  end

  [user_details, details_key]
end