Skip to content

Remove default_url_options[]= in ApplicationMailer - #6772

Open
hmcguire-shopify wants to merge 1 commit into
rubygems:masterfrom
Shopify:hm-ovyomkmzmwotuply
Open

Remove default_url_options[]= in ApplicationMailer#6772
hmcguire-shopify wants to merge 1 commit into
rubygems:masterfrom
Shopify:hm-ovyomkmzmwotuply

Conversation

@hmcguire-shopify

Copy link
Copy Markdown

The mutation predates the other method of configuring these values: it first appeared on ProfileMailer in 2009, while config.action_mailer.default_url_options was only added to the test environment in 2010, to production in 2014, and to development in 2015. The per-mailer mutations were then copy-pasted into each new mailer until they were consolidated into ApplicationMailer in 2024.

Since every environment sets config.action_mailer.default_url_options, the ApplicationMailer mutation just rewrites the same values into the same hash and can be removed.

The mutation predates the other method of configuring these values: it
first [appeared][1] on `ProfileMailer` in 2009, while
`config.action_mailer.default_url_options` was only added to the
[test][2] environment in 2010, to [production][3] in 2014, and to
[development][4] in 2015. The per-mailer mutations were then copy-pasted
into each new mailer until they were [consolidated][5] into
`ApplicationMailer` in 2024.

Since every environment sets `config.action_mailer.default_url_options`,
the `ApplicationMailer` mutation just rewrites the same values into the
same hash and can be removed.

[1]: e69fa4c
[2]: 8235147
[3]: 4dc8e0a
[4]: 06f4a5f
[5]: 372b7f9
@brian-penguin
brian-penguin self-requested a review August 18, 2026 15:42

@brian-penguin brian-penguin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rad! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants