class ActionController::Responder

def display(resource, given_options = {})


render xml: @user, status: :created

Results in:

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

Options sent by the user are also used:

render xml: @user, status: :ok

For XML requests it's equivalent to:

display @user, status: :ok

Display is just a shortcut to render a resource with the current format.
def display(resource, given_options = {})
  controller.render given_options.merge!(options).merge!(format => resource)
end