smartinez87/exception_notification — Issue #59: Can't send notification manually from ApplicationController
Author: coorasse
Created: 2012-02-10 19:18:26+00:00
State: open

No exception_notifier.options in request.env, I have to set it manually.
I have to do something like that:

def log_error(exception)
if notifier = Rails.application.config.middleware.detect { |x| x.klass == ExceptionNotifier }
env = request.env
env['exception_notifier.options'] = notifier.args.first || {}
ExceptionNotifier::Notifier.exception_notification(env, exception).deliver
env['exception_notifier.delivered'] = true
end
end