aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb4
-rw-r--r--actionmailer/lib/action_mailer/railties/log_subscriber.rb (renamed from actionmailer/lib/action_mailer/railties/subscriber.rb)2
-rw-r--r--actionmailer/test/log_subscriber_test.rb (renamed from actionmailer/test/subscriber_test.rb)10
3 files changed, 8 insertions, 8 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index a3afc23e6a..4c48d2bed6 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -9,8 +9,8 @@ module ActionMailer
ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
end
- require "action_mailer/railties/subscriber"
- subscriber ActionMailer::Railties::Subscriber.new
+ require "action_mailer/railties/log_subscriber"
+ log_subscriber ActionMailer::Railties::LogSubscriber.new
initializer "action_mailer.logger" do
ActionMailer::Base.logger ||= Rails.logger
diff --git a/actionmailer/lib/action_mailer/railties/subscriber.rb b/actionmailer/lib/action_mailer/railties/log_subscriber.rb
index cff852055c..d1b3dd33af 100644
--- a/actionmailer/lib/action_mailer/railties/subscriber.rb
+++ b/actionmailer/lib/action_mailer/railties/log_subscriber.rb
@@ -1,6 +1,6 @@
module ActionMailer
module Railties
- class Subscriber < Rails::Subscriber
+ class LogSubscriber < Rails::LogSubscriber
def deliver(event)
recipients = Array(event.payload[:to]).join(', ')
info("\nSent mail to #{recipients} (%1.fms)" % event.duration)
diff --git a/actionmailer/test/subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb
index 3d1736d64f..edd7c84d29 100644
--- a/actionmailer/test/subscriber_test.rb
+++ b/actionmailer/test/log_subscriber_test.rb
@@ -1,10 +1,10 @@
require "abstract_unit"
-require "rails/subscriber/test_helper"
-require "action_mailer/railties/subscriber"
+require "rails/log_subscriber/test_helper"
+require "action_mailer/railties/log_subscriber"
-class AMSubscriberTest < ActionMailer::TestCase
- include Rails::Subscriber::TestHelper
- Rails::Subscriber.add(:action_mailer, ActionMailer::Railties::Subscriber.new)
+class AMLogSubscriberTest < ActionMailer::TestCase
+ include Rails::LogSubscriber::TestHelper
+ Rails::LogSubscriber.add(:action_mailer, ActionMailer::Railties::LogSubscriber.new)
class TestMailer < ActionMailer::Base
def basic