diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-28 23:22:50 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-28 23:25:03 -0200 |
commit | 744307e525203639bb7672ef1a767b5088104334 (patch) | |
tree | 24a9d119fc956924d6ea9d2b5d4ac5e7dc0000f0 /actionmailer/lib | |
parent | 2cb576ef36fdf14c4d4e1b8e66d930af7ad35aeb (diff) | |
download | rails-744307e525203639bb7672ef1a767b5088104334.tar.gz rails-744307e525203639bb7672ef1a767b5088104334.tar.bz2 rails-744307e525203639bb7672ef1a767b5088104334.zip |
Send paths argument as an array rather than converting it internally
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index c4d2950abd..ff74185e37 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -748,7 +748,7 @@ module ActionMailer templates_path = headers.delete(:template_path) || self.class.mailer_name templates_name = headers.delete(:template_name) || action_name - each_template(templates_path, templates_name) do |template| + each_template(Array(templates_path), templates_name) do |template| self.formats = template.formats responses << { @@ -762,9 +762,9 @@ module ActionMailer end def each_template(paths, name, &block) #:nodoc: - templates = lookup_context.find_all(name, Array(paths)) + templates = lookup_context.find_all(name, paths) if templates.empty? - raise ActionView::MissingTemplate.new([paths], name, [paths], false, 'mailer') + raise ActionView::MissingTemplate.new(paths, name, paths, false, 'mailer') else templates.uniq { |t| t.formats }.each(&block) end |