method

render_to_string

rails latest stable - Class: AbstractController::Rendering
render_to_string(*args, &block)
public

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.