diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2010-01-17 03:20:30 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2010-01-17 03:20:30 +0530 |
commit | b04230e3bbf912d60601e9e7b797c4cd43581d51 (patch) | |
tree | 97a2f784a2ec2bfae4f960af56a9280dad6f7774 /actionmailer/lib/action_mailer/railties/subscriber.rb | |
parent | 867829b187969607aa12f2b0457f25da9c204db0 (diff) | |
parent | 6e3bee6cf1f0d2684152292db0a8b757249824fd (diff) | |
download | rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.gz rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.tar.bz2 rails-b04230e3bbf912d60601e9e7b797c4cd43581d51.zip |
Merge remote branch 'mainstream/master'
Conflicts:
actionpack/lib/action_controller/metal/flash.rb
Diffstat (limited to 'actionmailer/lib/action_mailer/railties/subscriber.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/railties/subscriber.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/railties/subscriber.rb b/actionmailer/lib/action_mailer/railties/subscriber.rb new file mode 100644 index 0000000000..af9c477237 --- /dev/null +++ b/actionmailer/lib/action_mailer/railties/subscriber.rb @@ -0,0 +1,20 @@ +module ActionMailer + module Railties + class Subscriber < Rails::Subscriber + def deliver(event) + recipients = Array(event.payload[:to]).join(', ') + info("Sent mail to #{recipients} (%1.fms)" % event.duration) + debug("\n#{event.payload[:mail]}") + end + + def receive(event) + info("Received mail (%.1fms)" % event.duration) + debug("\n#{event.payload[:mail]}") + end + + def logger + ActionMailer::Base.logger + end + end + end +end
\ No newline at end of file |