aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-11-12 14:27:08 +0000
committerLouise Crow <louise.crow@gmail.com>2013-11-12 15:33:02 +0000
commit70ae965de187244d5fde7dfff9c1c274fbba581f (patch)
tree5c3a49fdfe6bac044078cdabdd8dc760a67c5663 /app/controllers/application_controller.rb
parent3c844df6b1c97eaf2572a4db3c4dc69549982593 (diff)
Add a dummy exception notification address for testing
ActionMailer now checks for a 'to' address on sending mail, so supply one so that we can check exception notification mail sending. Also check that we have one before trying to call the exception notification code.
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index cbdffc441..161a82b26 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -138,7 +138,9 @@ class ApplicationController < ActionController::Base
backtrace = Rails.backtrace_cleaner.clean(exception.backtrace, :silent)
message << " " << backtrace.join("\n ")
Rails.logger.fatal("#{message}\n\n")
- ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver
+ if !AlaveteliConfiguration.exception_notifications_from.blank? && !AlaveteliConfiguration.exception_notifications_to.blank?
+ ExceptionNotifier::Notifier.exception_notification(request.env, exception).deliver
+ end
@status = 500
end
respond_to do |format|