Permalink
Browse files

Use the real charset for parts generated by a template, instead of th…

…e string "charset".

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jamis committed Jun 22, 2005
1 parent 2694b8c commit 053cb22c17b42bdd4bf60a96fbe73df332430556
Showing with 3 additions and 1 deletion.
  1. +1 −1 actionmailer/lib/action_mailer/base.rb
  2. +2 −0 actionmailer/test/mail_service_test.rb
@@ -178,7 +178,7 @@ def create!(method_name, *parameters)
type = (File.basename(path).split(".")[1..-2] || []).join("/")
next if type.empty?
@parts << Part.new(:content_type => type,
- :disposition => "inline", :charset => "charset",
+ :disposition => "inline", :charset => charset,
:body => render_message(File.basename(path).split(".")[0..-2].join('.'), @body))
end
end
@@ -479,7 +479,9 @@ def test_implicitly_multipart_messages
mail = TestMailer.create_implicitly_multipart_example(@recipient)
assert_equal 2, mail.parts.length
assert_equal "text/html", mail.parts[0].content_type
+ assert_equal "utf-8", mail.parts[0].sub_header("content-type", "charset")
assert_equal "text/plain", mail.parts[1].content_type
+ assert_equal "utf-8", mail.parts[1].sub_header("content-type", "charset")
end
def test_html_mail

0 comments on commit 053cb22

Please sign in to comment.