class ActionView::PartialRenderer
def render_partial_template(view, locals, template, layout, block)
def render_partial_template(view, locals, template, layout, block) ActiveSupport::Notifications.instrument( "render_partial.action_view", identifier: template.identifier, layout: layout && layout.virtual_path, locals: locals ) do |payload| content = template.render(view, locals, add_to_stack: !block) do |*name| view._layout_for(*name, &block) end content = layout.render(view, locals) { content } if layout payload[:cache_hit] = view.view_renderer.cache_hits[template.virtual_path] build_rendered_template(content, template) end end