Ruby on Rails latest stable (v5.2.3) - 2 notes - Class: ActionController::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

These similar methods exist in v5.2.3:

render_to_string(options = nil, &block) protected

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.

Show source
Register or log in to add new notes.
May 11, 2010
1 thank

No Layout, other options

While it renders to the same rules as render, you need to specify params.

You’d think this would work:

render_to_string "users/profile", :layout => false

You need to do this instead

render_to_string(:layout => "users/profile", :layout => false)
September 17, 2010 - (<= v2.3.8)
1 thank

No Layout (fixed typo)

@wiseleyb: Seems to be a typo, should be:

render_to_string(:action => "users/profile", :layout => false)