method

render_partial

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: PartialRenderer
render_partial() 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 332
      def render_partial
        instrument(:partial) do |payload|
          view, locals, block = @view, @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]
          content
        end
      end
Register or log in to add new notes.