display(resource, given_options={})
Instance Protected methods
Display is just a shortcut to render a resource with the current format.
1 | display @user , status: :ok |
For XML requests it's equivalent to:
1 | render xml: @user , status: :ok |
Options sent by the user are also used:
1 2 | respond_with( @user , status: :created ) display( @user , status: :ok ) |
Results in:
1 | render xml: @user , status: :created |
Please login to continue.