From 0fc51bee60071145eed8e5a197c0eff5bbdc75e8 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 1 Sep 2015 17:31:28 +0200 Subject: [PATCH] adds mailer asset host for staging and production envs --- config/environments/production.rb | 1 + config/environments/staging.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/config/environments/production.rb b/config/environments/production.rb index e24d08985..941ac300e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -64,6 +64,7 @@ Rails.application.configure do # 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: Rails.application.secrets.server_name } + config.action_mailer.asset_host = "https://#{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). diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e24d08985..941ac300e 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -64,6 +64,7 @@ Rails.application.configure do # 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: Rails.application.secrets.server_name } + config.action_mailer.asset_host = "https://#{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).