instance method
render_body
Ruby on Rails 5.2.8.1
Since v3.1.12Signature
render_body(context, options)
Render but returns a valid Rack body. If fibers are defined, we return a streaming body that renders the template piece by piece.
Note that partials are not supported to be rendered with streaming, so in such cases, we just wrap them in an array.
Parameters
-
contextreq -
optionsreq
Source
# File actionview/lib/action_view/renderer/renderer.rb, line 34
def render_body(context, options)
if options.key?(:partial)
[render_partial(context, options)]
else
StreamingTemplateRenderer.new(@lookup_context).render(context, options)
end
end
Defined in actionview/lib/action_view/renderer/renderer.rb line 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Renderer