diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/railtie.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 10 |
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 |