Do not load exception notifier in development mode.

This commit is contained in:
benni 2011-05-11 11:20:10 +02:00
parent 8db221ca5f
commit b71fcdf371

View file

@ -27,12 +27,13 @@ url_options.merge!({:port => Foodsoft.config[:port]}) if Foodsoft.config[:port]
Foodsoft::Application.configure do Foodsoft::Application.configure do
config.action_mailer.default_url_options = url_options config.action_mailer.default_url_options = url_options
if Rails.env !~ /development|test/
# Configuration of the exception_notification plugin # Configuration of the exception_notification plugin
# Mailadresses are set in config/app_config.yml # Mailadresses are set in config/app_config.yml
config.middleware.use ExceptionNotifier, config.middleware.use ExceptionNotifier,
:email_prefix => Foodsoft.config[:notification]['email_prefix'], :email_prefix => Foodsoft.config[:notification]['email_prefix'],
:sender_address => Foodsoft.config[:notification]['sender_address'], :sender_address => Foodsoft.config[:notification]['sender_address'],
:exception_recipients => Foodsoft.config[:notification]['error_recipients'] :exception_recipients => Foodsoft.config[:notification]['error_recipients']
end
end end