Dear list, I am trying to sent mails through ActionMailer. As I have done in the past. However I now get this really strange message; ActionView::ActionViewError (Due to changes in ActionMailer, you need to provide the mailer_name along with the template name. render "user_mailer/signup" render :file => "user_mailer/signup" If you are rendering a subtemplate, you must now use controller-like partial syntax: render :partial => ''signup'' # no mailer_name necessary ): So I did what anyone would do; mailer_name("contact") #the name of my ActionMailer class. That did not work. Neither did; render "contact/contact" or; render :file => "contact/contact" I am a bit at a loss now. I am using the globalize plugin which requires me to name my templates like this: "contact.en.text.plain.erb", perhaps that is causing the problem. Any help is greatly appreciated. With kind regards, Harm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am having the same problem, but am /not/ using the globalize plugin, so I don''t think the problem lies there. I am using code that ran on 1.1.6 but as soon as I moved to 2.0.2 I get this error. Have you found a solution? haarts wrote:> > > Dear list, > > I am trying to sent mails through ActionMailer. As I have done in the > past. However I now get this really strange message; > > ActionView::ActionViewError (Due to changes in ActionMailer, you need > to provide the mailer_name along with the template name. > > render "user_mailer/signup" > render :file => "user_mailer/signup" > > If you are rendering a subtemplate, you must now use controller-like > partial syntax: > > render :partial => ''signup'' # no mailer_name necessary > ): > > So I did what anyone would do; > mailer_name("contact") #the name of my ActionMailer class. > That did not work. Neither did; > render "contact/contact" > or; > render :file => "contact/contact" > > I am a bit at a loss now. I am using the globalize plugin which > requires me to name my templates like this: > "contact.en.text.plain.erb", perhaps that is causing the problem. > Any help is greatly appreciated. > > With kind regards, > Harm > > > >-- View this message in context: http://www.nabble.com/Actionmailer-and-mailer_name-tp15357010p15402871.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I did, well sort of. I my case it did have to do with Globalize. I think it is because Globalize is not Rails 2.0 compatible(yet). I had to comment out the inclusion of the action_mailer require in the init.rb of the plugin. After that it at least worked. Sorry I can not be of more help. With kind regards, Harm On Feb 11, 12:05 am, fattymelt <seth.m.gr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am having the same problem, but am /not/ using the globalize plugin, so I > don''t think the problem lies there. I am using code that ran on 1.1.6 but as > soon as I moved to 2.0.2 I get this error. Have you found a solution? > > > > haarts wrote: > > > Dear list, > > > I am trying to sent mails through ActionMailer. As I have done in the > > past. However I now get this really strange message; > > > ActionView::ActionViewError (Due to changes in ActionMailer, you need > > to provide the mailer_name along with the template name. > > > render "user_mailer/signup" > > render :file => "user_mailer/signup" > > > If you are rendering a subtemplate, you must now use controller-like > > partial syntax: > > > render :partial => ''signup'' # no mailer_name necessary > > ): > > > So I did what anyone would do; > > mailer_name("contact") #the name of my ActionMailer class. > > That did not work. Neither did; > > render "contact/contact" > > or; > > render :file => "contact/contact" > > > I am a bit at a loss now. I am using the globalize plugin which > > requires me to name my templates like this: > > "contact.en.text.plain.erb", perhaps that is causing the problem. > > Any help is greatly appreciated. > > > With kind regards, > > Harm > > -- > View this message in context:http://www.nabble.com/Actionmailer-and-mailer_name-tp15357010p1540287... > Sent from the RubyOnRails Users mailing list archive at Nabble.com.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks! Yes, it turns out in my case that this was due to some old localization code (code that was required to use the old salted password generator). This old code overrides the render_message method of ActionMailer, but does so in a way that is incompatible with 2.0.2. I haven''t spent the time to fix it yet, but when I do I will post the fix here. haarts wrote:> > > I did, well sort of. I my case it did have to do with Globalize. I > think it is because Globalize is not Rails 2.0 compatible(yet). I had > to comment out the inclusion of the action_mailer require in the > init.rb of the plugin. After that it at least worked. Sorry I can not > be of more help. > > With kind regards, > Harm > > On Feb 11, 12:05 am, fattymelt <seth.m.gr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I am having the same problem, but am /not/ using the globalize plugin, so >> I >> don''t think the problem lies there. I am using code that ran on 1.1.6 but >> as >> soon as I moved to 2.0.2 I get this error. Have you found a solution? >> >> >> >> haarts wrote: >> >> > Dear list, >> >> > I am trying to sent mails through ActionMailer. As I have done in the >> > past. However I now get this really strange message; >> >> > ActionView::ActionViewError (Due to changes in ActionMailer, you need >> > to provide the mailer_name along with the template name. >> >> > render "user_mailer/signup" >> > render :file => "user_mailer/signup" >> >> > If you are rendering a subtemplate, you must now use controller-like >> > partial syntax: >> >> > render :partial => ''signup'' # no mailer_name necessary >> > ): >> >> > So I did what anyone would do; >> > mailer_name("contact") #the name of my ActionMailer class. >> > That did not work. Neither did; >> > render "contact/contact" >> > or; >> > render :file => "contact/contact" >> >> > I am a bit at a loss now. I am using the globalize plugin which >> > requires me to name my templates like this: >> > "contact.en.text.plain.erb", perhaps that is causing the problem. >> > Any help is greatly appreciated. >> >> > With kind regards, >> > Harm >> >> -- >> View this message in >> context:http://www.nabble.com/Actionmailer-and-mailer_name-tp15357010p1540287... >> Sent from the RubyOnRails Users mailing list archive at Nabble.com. > > > >-- View this message in context: http://www.nabble.com/Actionmailer-and-mailer_name-tp15357010p15412035.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---