instance method
render
Ruby on Rails 3.2.22.5
Since v3.2.22.5Signature
render(context, options, block)
No documentation comment.
Parameters
-
contextreq -
optionsreq -
blockreq
Source
# File actionpack/lib/action_view/renderer/partial_renderer.rb, line 220
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 actionpack/lib/action_view/renderer/partial_renderer.rb line 220
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::PartialRenderer