Renders according to the same rules as render, but returns the result in a string instead of sending it as the response body to the browser.
Source Code
# File action_controller/base.rb, line 927 def render_to_string(options = nil, &block) #:doc: render(options, &block) ensure erase_render_results forget_variables_added_to_assigns reset_variables_added_to_assigns end
<code/>and<pre/>for code samples.