Helpers
related to template lookup using the lookup context information.
Methods
- A
- D
- E
- F
- T
Attributes
[R] | html_fallback_for_js | |
[R] | view_paths |
Instance Public methods
exists?(name, prefixes = [], partial = false, keys = [], **options) Link
Also aliased as: template_exists?
# File actionview/lib/action_view/lookup_context.rb, line 137 def exists?(name, prefixes = [], partial = false, keys = [], **options) name, prefixes = normalize_name(name, prefixes) details, details_key = detail_args_for(options) @view_paths.exists?(name, prefixes, partial, details, details_key, keys) end
find(name, prefixes = [], partial = false, keys = [], options = {}) Link
Also aliased as: find_template
# File actionview/lib/action_view/lookup_context.rb, line 124 def find(name, prefixes = [], partial = false, keys = [], options = {}) name, prefixes = normalize_name(name, prefixes) details, details_key = detail_args_for(options) @view_paths.find(name, prefixes, partial, details, details_key, keys) end
find_all(name, prefixes = [], partial = false, keys = [], options = {}) Link
# File actionview/lib/action_view/lookup_context.rb, line 131 def find_all(name, prefixes = [], partial = false, keys = [], options = {}) name, prefixes = normalize_name(name, prefixes) details, details_key = detail_args_for(options) @view_paths.find_all(name, prefixes, partial, details, details_key, keys) end
template_exists?(name, prefixes = [], partial = false, keys = [], **options) Link
Alias for: exists?
Instance Private methods
detail_args_for(options) Link
Compute details hash and key according to user options (e.g. passed from render).
# File actionview/lib/action_view/lookup_context.rb, line 159 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