def render_template(view, template, layout_name, locals)
        render_with_layout(view, template, layout_name, locals) do |layout|
          instrument(:template, identifier: template.identifier, layout: layout.try(:virtual_path)) do
            template.render(view, locals) { |*name| view._layout_for(*name) }
          end
        end
      end
def render_template(view, template, layout_name, locals)
        render_with_layout(view, template, layout_name, locals) do |layout|
          instrument(:template, identifier: template.identifier, layout: layout.try(:virtual_path)) do
            template.render(view, locals) { |*name| view._layout_for(*name) }
          end
        end
      end
Renders the given template. A string representing the layout can be
 supplied as well.