Method: ActionView::Renderer#render_body
- Defined in:
- actionview/lib/action_view/renderer/renderer.rb
#render_body(context, options) ⇒ Object
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.
40 41 42 43 44 45 46 |
# File 'actionview/lib/action_view/renderer/renderer.rb', line 40 def render_body(context, ) if .key?(:partial) [render_partial(context, )] else StreamingTemplateRenderer.new(@lookup_context).render(context, ) end end |