Permalink
Browse files

Only parse the mailer config file if it exists.

  • Loading branch information...
1 parent 4df967d commit ba3a27908487ec6066756aad5649734f2e331583 @delynn delynn committed Apr 26, 2011
Showing with 9 additions and 7 deletions.
  1. +9 −7 config/application.rb
View
16 config/application.rb
@@ -8,15 +8,17 @@
module SignalCI
class Application < Rails::Application
- MAILER = YAML.load_file Rails.root.join("config/mailer.yml")
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.action_controller.page_cache_directory = Rails.root.join("public/cache")
- config.action_mailer.smtp_settings = {
- :address => MAILER['address'],
- :port => MAILER['port'],
- :domain => MAILER['domain'],
- :enable_starttls_auto => false
- }
+ if Rails.root.join("config/mailer.yml").file?
+ MAILER = YAML.load_file(Rails.root.join("config/mailer.yml"))
+ config.action_mailer.smtp_settings = {
+ :address => MAILER['address'],
+ :port => MAILER['port'],
+ :domain => MAILER['domain'],
+ :enable_starttls_auto => false
+ }
+ end
end
end

0 comments on commit ba3a279

Please sign in to comment.