instance method
decorate
Ruby on Rails 5.2.8.1
Since v5.2.8.1 Last seen in v5.2.8.1 PrivateSignature
decorate(templates, path_info, details, locals)
Ensures all the resolver information is set in the template.
Parameters
-
templatesreq -
path_inforeq -
detailsreq -
localsreq
Source
# File actionview/lib/action_view/template/resolver.rb, line 195
def decorate(templates, path_info, details, locals)
cached = nil
templates.each do |t|
t.locals = locals
t.formats = details[:formats] || [:html] if t.formats.empty?
t.variants = details[:variants] || [] if t.variants.empty?
t.virtual_path ||= (cached ||= build_path(*path_info))
end
end
Defined in actionview/lib/action_view/template/resolver.rb line 195
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Resolver