This project is archived and is in readonly mode.
[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
-
Jeremy Kemper February 5th, 2010 @ 08:09 AM
- Milestone cleared.
- State changed from new to committed
363a752c36122c92d528aee83262f3ee2db460ae
-
Rob April 29th, 2011 @ 06:23 PM
I still get this in Rails 3.0.7. I have also tried placing it into config/environments/production.rb and config/environments/development.rb and neither of those work as well.
I am using:
config.action_mailer.default_url_options = { :host => "foo.com" }
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
- 4004 default_url_options is a missing method This is a problem in the prerelease, but not in master. P...