instance method decorate

Ruby on Rails 5.2.8.1

Since v5.2.8.1 Last seen in v5.2.8.1 Private

Signature

decorate(templates, path_info, details, locals)

Ensures all the resolver information is set in the template.

Parameters

templates req
path_info req
details req
locals req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close