Flowdock
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 79
      def resolve_layout(layout, keys, formats)
        details = @details.dup
        details[:formats] = formats

        case layout
        when String
          begin
            if layout.start_with?("/")
              with_fallbacks { find_template(layout, nil, false, [], details) }
            else
              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(formats), keys, formats)
        else
          layout
        end
      end
Register or log in to add new notes.