display

display(resource, given_options={})
Instance Protected methods

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
doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.