method

display

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: ActionController::Responder
display(resource, given_options={}) protected

Display is just a shortcut to render a resource with the current format.

display @user, status: :ok

For XML requests it’s equivalent to:

render xml: @user, status: :ok

Options sent by the user are also used:

respond_with(@user, status: :created)
display(@user, status: :ok)

Results in:

render xml: @user, status: :created
Show source
Register or log in to add new notes.