We override default_url_options in our mailers so that we can have dynamic hosts in the mailer's URLs. Roughly something like:
class MyMailer < ActionMailer::Base
def default_url_options
{ host: "#{some_dynamic_subdomain}.example.com" }
end
end
Going directly through ActionMailer::Base.default_url_options circumvents that override. This change will preserve it, but also should fall back to ActionMailer::Base.default_url_options if no override exists.
We override
default_url_options
in our mailers so that we can have dynamic hosts in the mailer's URLs. Roughly something like:Going directly through
ActionMailer::Base.default_url_options
circumvents that override. This change will preserve it, but also should fall back toActionMailer::Base.default_url_options
if no override exists.