uses server_name from secrets

This commit is contained in:
rgarcia
2015-08-21 19:18:30 +02:00
parent db45451d9b
commit 24d3342af2
3 changed files with 3 additions and 12 deletions

View File

@@ -1,8 +1,3 @@
def deploysecret(key)
@deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')['production']
@deploy_secrets_yml[key.to_s]
end
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
@@ -68,7 +63,7 @@ Rails.application.configure do
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { host: deploysecret(:server_name) }
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).