diff options
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 3 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/railties/log_subscriber.rb | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index f94e23fe05..0823120fc8 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -1,6 +1,7 @@ require 'mail' require 'action_mailer/tmail_compat' require 'action_mailer/collector' +require 'active_support/core_ext/array/wrap' module ActionMailer #:nodoc: # Action Mailer allows you to send email from your application using a mailer model and views. @@ -615,7 +616,7 @@ module ActionMailer #:nodoc: end def each_template(paths, name, &block) #:nodoc: - Array(paths).each do |path| + Array.wrap(paths).each do |path| templates = lookup_context.find_all(name, path) templates = templates.uniq_by { |t| t.formats } 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 |