1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use render instead render_to_body.

This commit is contained in:
José Valim 2010-02-24 19:35:12 +01:00
parent a39c7505bd
commit 9d7d6cd7ba
2 changed files with 2 additions and 2 deletions

View file

@ -605,7 +605,7 @@ module ActionMailer #:nodoc:
each_template(templates_path, templates_name) do |template| each_template(templates_path, templates_name) do |template|
responses << { responses << {
:body => render_to_body(:_template => template), :body => render(:_template => template),
:content_type => template.mime_type.to_s :content_type => template.mime_type.to_s
} }
end end

View file

@ -207,7 +207,7 @@ module ActionMailer
@parts.unshift create_inline_part(@body) @parts.unshift create_inline_part(@body)
elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ } elsif @parts.empty? || @parts.all? { |p| p.content_disposition =~ /^attachment/ }
self.class.view_paths.first.find_all(@template, {}, @mailer_name).each do |template| self.class.view_paths.first.find_all(@template, {}, @mailer_name).each do |template|
@parts << create_inline_part(render_to_body(:_template => template), template.mime_type) @parts << create_inline_part(render(:_template => template), template.mime_type)
end end
if @parts.size > 1 if @parts.size > 1