Andrew Kaspick
2006-Mar-18 20:34 UTC
implicit templates in ActionMailer broken due to change in ActionView
Hello, I''ve been using edge rails for a while now and used the recipe from the new recipes book on using implicit file names for multipart/alternative messages. This seems to have recently broke. I''ve named by templates according to the book and the docs... # for example, if the following templates existed: # * signup_notification.text.plain.rhtml # * signup_notification.text.html.rhtml # * signup_notification.text.xml.rxml # * signup_notification.text.x-yaml.rhtml I''ve gone through the code and found that the rhtml part of the file is not appended to the template name due to existing .''s in the filename. When the code gets to File.read in ActionView the code fails as the file (ex. signup_notification.text.plain) does not exist (missing the template extension). The render_file method in ActionView looks to have recently been changed (good at revision 3840... maybe a bit higher), causing the break, but I''m unsure of the reasons behind the changes, so I don''t have a proposed fix. I opened up a ticket at http://dev.rubyonrails.org/ticket/4297 to track this. Thanks
Jamis Buck
2006-Mar-18 22:45 UTC
Re: implicit templates in ActionMailer broken due to change in ActionView
Andrew, Thanks for this bug report. I''ve confirmed that the AM unit tests are failing rather spectacularly. I''ll jump in and see what I can discover. - Jamis On Mar 18, 2006, at 1:34 PM, Andrew Kaspick wrote:> Hello, > > I''ve been using edge rails for a while now and used the recipe from > the new recipes book on using implicit file names for > multipart/alternative messages. > > This seems to have recently broke. > > I''ve named by templates according to the book and the docs... > > # for example, if the following templates existed: > # * signup_notification.text.plain.rhtml > # * signup_notification.text.html.rhtml > # * signup_notification.text.xml.rxml > # * signup_notification.text.x-yaml.rhtml > > I''ve gone through the code and found that the rhtml part of the file > is not appended to the template name due to existing .''s in the > filename. When the code gets to File.read in ActionView the code > fails as the file (ex. signup_notification.text.plain) does not exist > (missing the template extension). > > The render_file method in ActionView looks to have recently been > changed (good at revision 3840... maybe a bit higher), causing the > break, but I''m unsure of the reasons behind the changes, so I don''t > have a proposed fix. > > I opened up a ticket at http://dev.rubyonrails.org/ticket/4297 to > track this. > > Thanks > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core
Jamis Buck
2006-Mar-18 22:56 UTC
Re: implicit templates in ActionMailer broken due to change in ActionView
Ok, this is fixed now. It was a fortunately simply matter of having AM report the full template file name to AV, instead of requiring AV to try and guess which one matches based on the name-minus-extension. - Jamis On Mar 18, 2006, at 3:45 PM, Jamis Buck wrote:> Andrew, > > Thanks for this bug report. I''ve confirmed that the AM unit tests > are failing rather spectacularly. I''ll jump in and see what I can > discover. > > - Jamis > > On Mar 18, 2006, at 1:34 PM, Andrew Kaspick wrote: > >> Hello, >> >> I''ve been using edge rails for a while now and used the recipe from >> the new recipes book on using implicit file names for >> multipart/alternative messages. >> >> This seems to have recently broke. >> >> I''ve named by templates according to the book and the docs... >> >> # for example, if the following templates existed: >> # * signup_notification.text.plain.rhtml >> # * signup_notification.text.html.rhtml >> # * signup_notification.text.xml.rxml >> # * signup_notification.text.x-yaml.rhtml >> >> I''ve gone through the code and found that the rhtml part of the file >> is not appended to the template name due to existing .''s in the >> filename. When the code gets to File.read in ActionView the code >> fails as the file (ex. signup_notification.text.plain) does not exist >> (missing the template extension). >> >> The render_file method in ActionView looks to have recently been >> changed (good at revision 3840... maybe a bit higher), causing the >> break, but I''m unsure of the reasons behind the changes, so I don''t >> have a proposed fix. >> >> I opened up a ticket at http://dev.rubyonrails.org/ticket/4297 to >> track this. >> >> Thanks >> _______________________________________________ >> Rails-core mailing list >> Rails-core@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-core > > _______________________________________________ > Rails-core mailing list > Rails-core@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-core