aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikachu.com>2010-02-15 21:44:30 +0700
committerJosé Valim <jose.valim@gmail.com>2010-02-16 22:36:15 +0100
commitf0523f72b46db14e2f50c8347a8708734c650f84 (patch)
treecf6562eb8f6c2e302a33840f36f04d838aadb569 /actionmailer
parent7cff54f5d3ae2e364f0d147ceb86ea701b21389c (diff)
downloadrails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.gz
rails-f0523f72b46db14e2f50c8347a8708734c650f84.tar.bz2
rails-f0523f72b46db14e2f50c8347a8708734c650f84.zip
Rename Rails::Subscriber to Rails::LogSubscriber
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