diff options
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 840708cdc6..d67d563181 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -693,15 +693,8 @@ module ActionMailer #:nodoc: end def each_template(paths, name, &block) #:nodoc: - Array.wrap(paths).each do |path| - templates = lookup_context.find_all(name, path) - templates = templates.uniq_by { |t| t.formats } - - unless templates.empty? - templates.each(&block) - return - end - end + templates = lookup_context.find_all(name, Array.wrap(paths)) + templates.uniq_by { |t| t.formats }.each(&block) end def create_parts_from_responses(m, responses) #:nodoc: |