This project is archived and is in readonly mode.

#3857 ✓committed
Paul Rosania

[PATCH] Rails 3.0 beta ActionMailer::Base.default_url_options not available in app config

Reported by Paul Rosania | February 5th, 2010 @ 05:16 AM | in 3.0.2

Due to the use of initializers to install ActionController::UrlFor into ActionMailer::Base, #default_url_options is not available during configuration. This means that things like ActionController::Base.default_url_options[:host] = 'http://example.com' are impossible.

The proposed patch modifies initializer precedence, to run "action_mailer.url_for" ahead of :load_environment_config, resolving the issue.

It appears that this style of configuration is becoming deprecated in Rails 3 -- however, I believe that even with a config.action_mailer.xxx style of initialization, this patch is still necessary. (I just couldn't get that method to work under any scenario.)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages