Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#3857

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.)

Reported by Paul Rosania · February 5th, 2010 @ 05:16 AM

State: committed
Milestone: 3.0.2
Assigned to: nobody
Importance: none

Activity

  1. Jeremy Kemper
    Jeremy Kemper
    • Milestone cleared.
    • State changed from new to committed

    363a752c36122c92d528aee83262f3ee2db460ae

    February 5th, 2010 @ 08:09 AM

  2. Jeremy Kemper
  3. Rob
    Rob

    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" }

    April 29th, 2011 @ 06:23 PM