rails/rails — pull request #6981 by jeyb (2012-07-06 05:47:15+00:00)
Title: Fixes issue #5660: Failsafe exception returns text/html and text/plain.

If the request format is text/html then return the existing failsafe
response. For all other formats return text/plain.

The original issue points out to return JSON at the appropriate time,
however as @wycats pointed out, it's often better to return text/plain.