aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-29 17:08:08 -0700
committerwycats <wycats@gmail.com>2010-03-29 17:08:50 -0700
commit4aded43b73ff94dbf06b4a2d2075651ce454e1d5 (patch)
tree6bac5b0c25e5186b6e92c04fb6e19550630bbe8a /actionmailer/lib
parent331327d3919a633679dd3f434d13173fa8df010f (diff)
downloadrails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.gz
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.tar.bz2
rails-4aded43b73ff94dbf06b4a2d2075651ce454e1d5.zip
Replace the placeholder base_hook API with on_load. To specify some code that
should run during framework load do: ActiveSupport.on_load(:action_controller) do # Code run in the context of AC::Base end
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 793cd53518..af7255ae4f 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -291,7 +291,7 @@ module ActionMailer #:nodoc:
:parts_order => [ "text/plain", "text/enriched", "text/html" ]
}.freeze
- ActionMailer.run_base_hooks(self)
+ ActiveSupport.run_load_hooks(:action_mailer, self)
class << self
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index 2703367fdb..882e078d1b 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -6,18 +6,18 @@ module ActionMailer
config.action_mailer = ActiveSupport::OrderedOptions.new
initializer "action_mailer.url_for", :before => :load_environment_config do |app|
- ActionMailer.base_hook { include app.routes.url_helpers }
+ ActiveSupport.on_load(:action_mailer) { include app.routes.url_helpers }
end
require "action_mailer/railties/log_subscriber"
log_subscriber :action_mailer, ActionMailer::Railties::LogSubscriber.new
initializer "action_mailer.logger" do
- ActionMailer.base_hook { self.logger ||= Rails.logger }
+ ActiveSupport.on_load(:action_mailer) { self.logger ||= Rails.logger }
end
initializer "action_mailer.set_configs" do |app|
- ActionMailer.base_hook do
+ ActiveSupport.on_load(:action_mailer) do
app.config.action_mailer.each do |k,v|
send "#{k}=", v
end