Method: AbstractController::Rendering#render
- Defined in:
- actionpack/lib/abstract_controller/rendering.rb
#render(*args, &block) ⇒ Object
Normalizes arguments and options, and then delegates to render_to_body and sticks the result in ‘self.response_body`.
Supported options depend on the underlying ‘render_to_body` implementation.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'actionpack/lib/abstract_controller/rendering.rb', line 26 def render(*args, &block) = _normalize_render(*args, &block) rendered_body = render_to_body() if [:html] _set_html_content_type else _set_rendered_content_type rendered_format end _set_vary_header self.response_body = rendered_body end |