diff options
author | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-12-25 13:06:11 -0800 |
---|---|---|
committer | Yehuda Katz <wycats@Yehuda-Katz.local> | 2009-12-25 13:06:11 -0800 |
commit | 8f6da9483b28ec82e4577bf4cbe5209e2c750c84 (patch) | |
tree | 4c52a09b3268ff90dae12f8bc525f0b2f3acbace /actionmailer/lib/action_mailer/part.rb | |
parent | 2e79ec71a542c2d2e7bedbe12eda0b5e177fb0e0 (diff) | |
parent | 9f1c359a201bfacff7b89cd1e8579bc1bdf541e2 (diff) | |
download | rails-8f6da9483b28ec82e4577bf4cbe5209e2c750c84.tar.gz rails-8f6da9483b28ec82e4577bf4cbe5209e2c750c84.tar.bz2 rails-8f6da9483b28ec82e4577bf4cbe5209e2c750c84.zip |
Merge remote branch 'jose/am'
Diffstat (limited to 'actionmailer/lib/action_mailer/part.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/part.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/actionmailer/lib/action_mailer/part.rb b/actionmailer/lib/action_mailer/part.rb index 2bbb59cdb6..716eaae86e 100644 --- a/actionmailer/lib/action_mailer/part.rb +++ b/actionmailer/lib/action_mailer/part.rb @@ -4,7 +4,8 @@ module ActionMailer # and add them to the +parts+ list of the mailer, it is easier # to use the helper methods in ActionMailer::PartContainer. class Part - include AdvAttrAccessor, PartContainer, Utils + include PartContainer + extend AdvAttrAccessor # Represents the body of the part, as a string. This should not be a # Hash (like ActionMailer::Base), but if you want a template to be rendered @@ -82,16 +83,8 @@ module ActionMailer @parts.unshift Part.new(:charset => charset, :body => @body, :content_type => 'text/plain') @body = nil end - - @parts.each do |p| - prt = (TMail::Mail === p ? p : p.to_mail(defaults)) - part.parts << prt - end - - if real_content_type =~ /multipart/ - ctype_attrs.delete 'charset' - part.set_content_type(real_content_type, nil, ctype_attrs) - end + + setup_multiple_parts(part, real_content_type, ctype_attrs) end headers.each { |k,v| part[k] = v } |