-
render ... :location => @userwill set the HTTP location header to inform the client of the location of the newly created resource (that is, its URL) -
head :oksetsrenderto return an empty response (so just the header, no body) with status 200.head :okis shorthand forrender nothing: true, status: :ok.
Here’s a list of all the:statusoptions you can use for setting the appropriate status code.