Actionmailer and mailer_name

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

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:

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

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: