From cf7efe3f7d532ffd329c4a5f686cea5adb98fded Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 23 Sep 2011 06:59:39 +0000 Subject: [PATCH] code layout clean up of render_multipart() at app/models/mailer.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7466 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/mailer.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 8fcc3fbe0..d0dac72c6 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -418,11 +418,16 @@ class Mailer < ActionMailer::Base def render_multipart(method_name, body) if Setting.plain_text_mail? content_type "text/plain" - body render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb') + body render(:file => "#{method_name}.text.plain.rhtml", + :body => body, + :layout => 'mailer.text.plain.erb') else content_type "multipart/alternative" - part :content_type => "text/plain", :body => render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb') - part :content_type => "text/html", :body => render_message("#{method_name}.text.html.rhtml", body) + part :content_type => "text/plain", + :body => render(:file => "#{method_name}.text.plain.rhtml", + :body => body, :layout => 'mailer.text.plain.erb') + part :content_type => "text/html", + :body => render_message("#{method_name}.text.html.rhtml", body) end end -- 2.39.5