method

render_partial

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: PartialRenderer
render_partial(view, template) 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/partial_renderer.rb, line 346 def render_partial(view, template) instrument(:partial, identifier: template.identifier) do |payload| locals, block = @locals, @block object, as = @object, @variable if !block && (layout = @options[:layout]) layout = find_template(layout.to_s, @template_keys) end object = locals[as] if object.nil? # Respect object when object is false locals[as] = object if @has_object content = template.render(view, locals) 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, layout) end end
Register or log in to add new notes.