aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-11-29 02:52:49 +0000
committerMichael Koziarski <michael@koziarski.com>2007-11-29 02:52:49 +0000
commit1d32cec17d768ac78d52903f5ed8b19cc37c7f78 (patch)
treef8149c5e29a8ad85eed0332c79b76fa62e15d899 /actionmailer/lib
parentfd3f048f6dda74193644e2bbb23044e64df84449 (diff)
downloadrails-1d32cec17d768ac78d52903f5ed8b19cc37c7f78.tar.gz
rails-1d32cec17d768ac78d52903f5ed8b19cc37c7f78.tar.bz2
rails-1d32cec17d768ac78d52903f5ed8b19cc37c7f78.zip
Allow body to be specified for nested parts with action mailer. Closes #10271 [redinger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/part.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/actionmailer/lib/action_mailer/part.rb b/actionmailer/lib/action_mailer/part.rb
index 31f5b441e3..de1b1689f7 100644
--- a/actionmailer/lib/action_mailer/part.rb
+++ b/actionmailer/lib/action_mailer/part.rb
@@ -84,11 +84,8 @@ module ActionMailer
end
else
if String === body
- part = TMail::Mail.new
- part.body = body
- part.set_content_type(real_content_type, nil, ctype_attrs)
- part.set_content_disposition "inline"
- m.parts << part
+ @parts.unshift Part.new(:charset => charset, :body => @body, :content_type => 'text/plain')
+ @body = nil
end
@parts.each do |p|