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.
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:
render “user_mailer/signup”
That did not work. Neither did;
Harm
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.
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.