RailsCasts Pro episodes are now free!

Learn more or hide this

Flambino's Profile

GitHub User: Flambino

Site: http://stimulacrum.com

Comments by Flambino

Avatar

Yeah, web APIs are (or should be) sticklers for proper status codes, but any ol' HTML browser can infer a lot from the status code too. Whether or not to use the URL when auto-completing an address for the user, for instance. It's annoying to have the browser remember a URL for an error page, only because that page accidentally sent a 200 OK

Avatar

Nice episode, but it would be beneficial to add something like response.status = request.path[1..-1] to make the status code carry over (if anyone knows of a nicer way to do this, speak up).

Otherwise, the error pages will all have a status of 200 OK since the error controller itself responded normally.