diff options
author | José Valim <jose.valim@gmail.com> | 2010-03-08 20:57:33 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-08 20:57:33 +0100 |
commit | 36eb1a686c831d5a14998bb9ac7cc60efa363373 (patch) | |
tree | cdaa517ecfa17da37f9d5502a30ff9e73169ca47 /actionmailer/lib/action_mailer/base.rb | |
parent | bdf5096816d03f2bdaefd20a07a0fa562543549c (diff) | |
download | rails-36eb1a686c831d5a14998bb9ac7cc60efa363373.tar.gz rails-36eb1a686c831d5a14998bb9ac7cc60efa363373.tar.bz2 rails-36eb1a686c831d5a14998bb9ac7cc60efa363373.zip |
Bring AM up to date with new rendering stack.
Diffstat (limited to 'actionmailer/lib/action_mailer/base.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6937d76b5d..bc708cca56 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -614,14 +614,12 @@ module ActionMailer #:nodoc: def each_template(paths, name, &block) #:nodoc: Array(paths).each do |path| - self.class.view_paths.each do |load_paths| - templates = load_paths.find_all(name, {}, path) - templates = templates.uniq_by { |t| t.details[:formats] } + templates = lookup_context.find_all(name, path) - unless templates.empty? - templates.each(&block) - return - end + unless templates.empty? + templates = templates.uniq_by { |t| t.details[:formats] } + templates.each(&block) + return end end end |