diff options
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 14 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/old_api.rb | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 246816e953..cd0c5bea53 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -267,11 +267,9 @@ module ActionMailer #:nodoc: include AbstractController::Logger include AbstractController::Rendering - include AbstractController::DetailsCache include AbstractController::Layouts include AbstractController::Helpers include AbstractController::Translation - include AbstractController::Compatibility helper ActionMailer::MailHelper @@ -618,14 +616,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 diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index 941261a5b4..aeb653c5db 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -206,7 +206,7 @@ module ActionMailer if String === @body @parts.unshift create_inline_part(@body) elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ } - self.class.view_paths.first.find_all(@template, {}, @mailer_name).each do |template| + lookup_context.find_all(@template, @mailer_name).each do |template| @parts << create_inline_part(render(:_template => template), template.mime_type) end |