rails/rails — pull request #7636 by steveklabnik (2012-09-14 05:22:30+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.