rails/rails — pull request #14225 by ecoologic (2014-02-28 05:47:47+00:00)
Title: extract render detailed exception in own method

Refactor: Improves readability and modularity.

We're using Frisby.js. As it's nice to have a consistent JSON response even when an exception occurs, we monkey patched `DebugExceptions#render_exception` to return a JSON response which includes the stacktrace.

With this extraction you'll only have to override the logic that actually renders the HTML.