2010-03-20 13:45:58 +01:00
|
|
|
# Initial load the default config and database from rails environment
|
2012-08-24 19:52:38 +02:00
|
|
|
# See config/app_config.yml for further details
|
|
|
|
# Load Config, start by selecting defaults via current environment
|
|
|
|
require 'foodsoft_config'
|
|
|
|
FoodsoftConfig.init
|
2009-01-06 15:45:19 +01:00
|
|
|
|
2010-03-20 14:49:46 +01:00
|
|
|
# Set action mailer default host for url generating
|
2010-03-22 01:25:24 +01:00
|
|
|
url_options = {
|
2012-08-24 19:52:38 +02:00
|
|
|
:host => FoodsoftConfig[:host],
|
|
|
|
:protocol => FoodsoftConfig[:protocol]
|
2010-03-20 14:49:46 +01:00
|
|
|
}
|
2012-08-24 19:52:38 +02:00
|
|
|
url_options.merge!({:port => FoodsoftConfig[:port]}) if FoodsoftConfig[:port]
|
2010-03-20 14:49:46 +01:00
|
|
|
|
2011-05-11 11:01:47 +02:00
|
|
|
Foodsoft::Application.configure do
|
|
|
|
config.action_mailer.default_url_options = url_options
|
2011-05-11 11:20:10 +02:00
|
|
|
|
2013-07-13 23:06:30 +02:00
|
|
|
if %w(production).include? Rails.env
|
2011-05-11 11:20:10 +02:00
|
|
|
# Configuration of the exception_notification plugin
|
|
|
|
# Mailadresses are set in config/app_config.yml
|
2013-07-13 23:06:30 +02:00
|
|
|
config.middleware.use ExceptionNotification::Rack,
|
|
|
|
:email => {
|
|
|
|
:email_prefix => FoodsoftConfig[:notification]['email_prefix'],
|
|
|
|
:sender_address => FoodsoftConfig[:notification]['sender_address'],
|
|
|
|
:exception_recipients => FoodsoftConfig[:notification]['error_recipients']
|
|
|
|
}
|
2011-05-11 11:20:10 +02:00
|
|
|
end
|
2011-05-11 11:01:47 +02:00
|
|
|
end
|
2010-03-20 13:45:58 +01:00
|
|
|
|