mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Send paths argument as an array rather than converting it internally
This commit is contained in:
parent
2cb576ef36
commit
744307e525
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue