method

display

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActionController::Responder

Method deprecated or moved

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

These similar methods exist in v7.1.3.2:

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.