method

render_partial

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: PartialRenderer

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.0.0) is shown here.

These similar methods exist in v7.1.3.2:

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.