instance method render

Ruby on Rails 4.2.9

Since v3.2.22.5

Available in: v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

render(context, options, block)

No documentation comment.

Parameters

context req
options req
block req
Source
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 292
    def render(context, options, block)
      setup(context, options, block)
      identifier = (@template = find_partial) ? @template.identifier : @path

      @lookup_context.rendered_format ||= begin
        if @template && @template.formats.present?
          @template.formats.first
        else
          formats.first
        end
      end

      if @collection
        instrument(:collection, :identifier => identifier || "collection", :count => @collection.size) do
          render_collection
        end
      else
        instrument(:partial, :identifier => identifier) do
          render_partial
        end
      end
    end

Defined in actionview/lib/action_view/renderer/partial_renderer.rb line 292 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionView::PartialRenderer

Type at least 2 characters to search.

↑↓ navigate · open · esc close