From 41af6d9a78446a5219a321cf638945b1608cefd8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 17 Mar 2010 22:27:48 -0700 Subject: Use Array.wrap not Array() --- actionmailer/lib/action_mailer/railties/log_subscriber.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionmailer/lib/action_mailer/railties') diff --git a/actionmailer/lib/action_mailer/railties/log_subscriber.rb b/actionmailer/lib/action_mailer/railties/log_subscriber.rb index d1b3dd33af..af76d807d0 100644 --- a/actionmailer/lib/action_mailer/railties/log_subscriber.rb +++ b/actionmailer/lib/action_mailer/railties/log_subscriber.rb @@ -1,8 +1,10 @@ +require 'active_support/core_ext/array/wrap' + module ActionMailer module Railties class LogSubscriber < Rails::LogSubscriber def deliver(event) - recipients = Array(event.payload[:to]).join(', ') + recipients = Array.wrap(event.payload[:to]).join(', ') info("\nSent mail to #{recipients} (%1.fms)" % event.duration) debug(event.payload[:mail]) end @@ -17,4 +19,4 @@ module ActionMailer end end end -end \ No newline at end of file +end -- cgit v1.2.3