Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Send paths argument as an array rather than converting it internally

  • Loading branch information...
commit 744307e525203639bb7672ef1a767b5088104334 1 parent 2cb576e
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionmailer/lib/action_mailer/base.rb
View
6 actionmailer/lib/action_mailer/base.rb
@@ -748,7 +748,7 @@ def collect_responses(headers) #:nodoc:
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 @@ def collect_responses(headers) #:nodoc:
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
Please sign in to comment.
Something went wrong with that request. Please try again.