aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-03-17 22:27:48 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-03-17 22:27:48 -0700
commit41af6d9a78446a5219a321cf638945b1608cefd8 (patch)
tree95a5e284c6504e28802aa3a8168a8b7cc450a0e5 /actionmailer
parentfe2f383cf3c0aa6901487c398b9ae8ffce03ecbd (diff)
downloadrails-41af6d9a78446a5219a321cf638945b1608cefd8.tar.gz
rails-41af6d9a78446a5219a321cf638945b1608cefd8.tar.bz2
rails-41af6d9a78446a5219a321cf638945b1608cefd8.zip
Use Array.wrap not Array()
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb3
-rw-r--r--actionmailer/lib/action_mailer/railties/log_subscriber.rb6
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