From 2a12686832fbcf0566454904a5d733998506bf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 12 Mar 2010 14:25:10 +0100 Subject: Allow anything that responds to render to be given as :template and use find_template instead of find in views. --- actionmailer/lib/action_mailer/base.rb | 2 +- actionmailer/lib/action_mailer/old_api.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'actionmailer/lib/action_mailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index ef3820ad67..f94e23fe05 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -605,7 +605,7 @@ module ActionMailer #:nodoc: each_template(templates_path, templates_name) do |template| responses << { - :body => render(:_template => template), + :body => render(:template => template), :content_type => template.mime_type.to_s } end diff --git a/actionmailer/lib/action_mailer/old_api.rb b/actionmailer/lib/action_mailer/old_api.rb index aeb653c5db..fb4b6701dd 100644 --- a/actionmailer/lib/action_mailer/old_api.rb +++ b/actionmailer/lib/action_mailer/old_api.rb @@ -207,7 +207,7 @@ module ActionMailer @parts.unshift create_inline_part(@body) elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ } lookup_context.find_all(@template, @mailer_name).each do |template| - @parts << create_inline_part(render(:_template => template), template.mime_type) + @parts << create_inline_part(render(:template => template), template.mime_type) end if @parts.size > 1 -- cgit v1.2.3