Rails HTTP Status Code to Symbol Mapping

24/Jul/2013 · 1 minute read

Sometimes you might need to set the HTTP response head with different status to specify the different handled results. You can do this in Rails by add a :status to a rails method such as #respond_with. Here list all the maps:

{% gist 2405434 %}

Addtionally, you can view all these on your local machine by installing the gem cheat, and see all status codes using command cheat status_codes.

All these informations come from internet, the codes file comes from ktkaushik’s gist and other information comes from Cody Fauser’s post