Is anyone out there rendering partials successfully in ActionMailer
I am having trouble with this, and wasn’t sure if it was my
configuration or something with a version of Rails I’m running.
We’ve got over 15 mailer templates, all working like a charm.
But we have a piece of shared code, that we’d really like to not have to
copy & paste into 5 other different templates.
In case it has to do with my setup, here’s a bit about it:
class Mailer < ActionMailer::Base
In views/mailer/ - I have:
_test.rhtml - the partial I’m trying to render
send.rhtml - the template calling the partial
In send.rhtml, I’ve tried various incarnations of:
<%= render :partial => “test” %>
<%= render_partial(“mailer/test”) %>
<%= render_partial(“test”) %>
<%= render_file(“mailer/_test.rhtml”, false) %>
(one at a time, of course) … all to no avail.
undefined method `controller_path’ for Mailer:Class
Edge Rails: Rev 3476
OS X Tiger latest / all updates applied.
Any insight would be mucho appreciated!!
ps. I have a ticket opened here, but I hope I can close it soon (due to
user error not a limit in Rails!):