mailr/config/initializers/show_exceptions.rb

17 lines
447 B
Ruby
Raw Normal View History

2011-09-05 19:08:22 +02:00
require 'action_dispatch/middleware/show_exceptions'
module ActionDispatch
class ShowExceptions
private
def render_exception_with_template(env, exception)
body = InternalController.action(rescue_responses[exception.class.name]).call(env)
log_error(exception)
body
rescue
render_exception_without_template(env, exception)
end
alias_method_chain :render_exception, :template
end
end