mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use the real charset for parts generated by a template, instead of the string "charset".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
2694b8cf27
commit
053cb22c17
2 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,7 @@ module ActionMailer #:nodoc:
|
|||
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 @@ EOF
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue