This project is archived and is in readonly mode.
render :template sends malformed Content-Type header for ActionMailer views
-
Aditya Sanghi
- State changed from new to needs-more-info
- Importance changed from to Low
Paul, Can you confirm if this problem goes away if you rename the template to email_template.html.erb?
Mailer template name should be email_template.text.erb or email_template.html.erb not email_template.text.html.erb.
I'll investigate further how the content-type is being worked out in case the name is wrongly provided as email_template.text.html.erb .
-
Aditya Sanghi
..just confirming that this is not a problem on Rails 3.0 (even if you name your template email_template.text.html.erb). (I only realized right now that you were on 2.3.9)
-
Aditya Sanghi
I also now confirm that this problem exists on 2.3.x. Paul can you submit a failing test and/or a patch to solve the problem?
-
Aditya Sanghi
Sorry to post right back, but i also confirm that this problem is NOT there if the template is named correctly as email_template.html.erb or email_template.text.erb
-
Aditya Sanghi
- State changed from needs-more-info to wontfix
Okay i've investigated this deeper, and there has been major refactoring in Rails 3 around this area of rendering where this is not a problem.
Also I have already mentioned that the right way to solve your problem is to rename your template correctly, which is also the documented way of naming your template in Rails 2/3.x
Marking ticket as wontfix. Please feel free to comment if you think otherwise but it is unlikely that this will be fixed in the 2.3.x branch unless you can provide a patch with tests and it is accepted by the core committers.