resolve_layout(layout, keys, formats) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/renderer/template_renderer.rb, line 87
      def resolve_layout(layout, keys, formats)
        details = @details.dup
        details[:formats] = formats

        case layout
        when String
          begin
            if layout.start_with?("/")
              raise ArgumentError, "Rendering layouts from an absolute path is not supported."
            else
              @lookup_context.find_template(layout, nil, false, [], details)
            end
          rescue ActionView::MissingTemplate
            all_details = @details.merge(formats: @lookup_context.default_formats)
            raise unless template_exists?(layout, nil, false, [], **all_details)
          end
        when Proc
          resolve_layout(layout.call(@lookup_context, formats), keys, formats)
        else
          layout
        end
      end
Register or log in to add new notes.