rails/rails — pull request #14745 by razum2um (2014-04-14 13:54:36+00:00)
Title: Display diagnostics in text format for xhr request

When ActiveRecord::NotFound is raised in controller's - detailed exception (xhr.responseText) is rendered like this:

```

RuntimeError

puke!

Rails.root: unset

Application Trace
/Users/razum2um/Code/rails/actionpack/test/dispatch/debug_exceptions_test.rb:60:in `call'
/Users/razum2um/Code/rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
```

This fixes it by using standard .text template
Initial idea in #11960