Move the default_url_options config to the action_mailer initializer

We can't use Rails.application.config here because the initializers
run after ActionMailer::Base has been set up.
This commit is contained in:
Andy Allan 2018-04-18 10:29:59 +08:00
parent 713de1fadb
commit 17c706291c
2 changed files with 3 additions and 3 deletions

View file

@ -5,3 +5,6 @@ ActionMailer::Base.smtp_settings = {
:domain => "localhost",
:enable_starttls_auto => false
}
# Set the host and protocol for all action mailer urls
ActionMailer::Base.default_url_options = { :host => SERVER_URL, :protocol => SERVER_PROTOCOL }