render_template(view, template, layout_name, locals)
private
Renders the given template. A string representing the layout can be
supplied as well.
# File actionview/lib/action_view/renderer/template_renderer.rb, line 58
def render_template(view, template, layout_name, locals)
render_with_layout(view, template, layout_name, locals) do |layout|
ActiveSupport::Notifications.instrument(
"render_template.action_view",
identifier: template.identifier,
layout: layout && layout.virtual_path,
locals: locals
) do
template.render(view, locals) { |*name| view._layout_for(*name) }
end
end
end