##// END OF EJS Templates
code layout clean up of render_multipart() at app/models/mailer.rb...
Toshi MARUYAMA -
r7346:cf7efe3f7d53
parent child
Show More
@@ -418,11 +418,16 class Mailer < ActionMailer::Base
418 def render_multipart(method_name, body)
418 def render_multipart(method_name, body)
419 if Setting.plain_text_mail?
419 if Setting.plain_text_mail?
420 content_type "text/plain"
420 content_type "text/plain"
421 body render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb')
421 body render(:file => "#{method_name}.text.plain.rhtml",
422 :body => body,
423 :layout => 'mailer.text.plain.erb')
422 else
424 else
423 content_type "multipart/alternative"
425 content_type "multipart/alternative"
424 part :content_type => "text/plain", :body => render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb')
426 part :content_type => "text/plain",
425 part :content_type => "text/html", :body => render_message("#{method_name}.text.html.rhtml", body)
427 :body => render(:file => "#{method_name}.text.plain.rhtml",
428 :body => body, :layout => 'mailer.text.plain.erb')
429 part :content_type => "text/html",
430 :body => render_message("#{method_name}.text.html.rhtml", body)
426 end
431 end
427 end
432 end
428
433
General Comments 0
You need to be logged in to leave comments. Login now