Method: AbstractController::Rendering#render_to_string

Defined in:
lib/abstract_controller/rendering.rb

#render_to_string(*args, &block) ⇒ Object

Similar to #render, but only returns the rendered template as a string, instead of setting self.response_body.

If a component extends the semantics of response_body (as ActionController extends it to be anything that responds to the method each), this method needs to be overridden in order to still return a string.



45
46
47
48
# File 'lib/abstract_controller/rendering.rb', line 45

def render_to_string(*args, &block)
  options = _normalize_render(*args, &block)
  render_to_body(options)
end