aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorPaul Rosania <paul.rosania@gmail.com>2010-02-05 00:11:09 -0500
committerJeremy Kemper <jeremy@bitsweat.net>2010-02-05 00:08:56 -0800
commit363a752c36122c92d528aee83262f3ee2db460ae (patch)
treeb959a0b7a79db8a1cb0c59fc2d5e182f0eea441c /actionmailer
parent459ecaf95db12ec64e70c02f8ee58ddb1133021e (diff)
downloadrails-363a752c36122c92d528aee83262f3ee2db460ae.tar.gz
rails-363a752c36122c92d528aee83262f3ee2db460ae.tar.bz2
rails-363a752c36122c92d528aee83262f3ee2db460ae.zip
install ActionController::UrlFor before environment is parsed, to provide ActionMailer#default_url_options=
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index b5230f14ed..a3afc23e6a 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -5,6 +5,10 @@ module ActionMailer
class Railtie < Rails::Railtie
railtie_name :action_mailer
+ initializer "action_mailer.url_for", :before => :load_environment_config do |app|
+ ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
+ end
+
require "action_mailer/railties/subscriber"
subscriber ActionMailer::Railties::Subscriber.new
@@ -17,9 +21,5 @@ module ActionMailer
ActionMailer::Base.send "#{k}=", v
end
end
-
- initializer "action_mailer.url_for" do |app|
- ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
- end
end
-end
+end \ No newline at end of file