Forum: Ruby on Rails Rendering partials with ActionMailer

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ff43001ac5fe9805aa6ca2e89d3b7b5d?d=identicon&s=25 Jake Janovetz (janovetz)
on 2006-01-29 20:10
Can ActionMailer render partials (like .sigs, for example)?  When I try
to render :partial, I get an error:

  undefined method `controller_path' for SomeNotify:Class

I also tried putting the partial within /shared, but it likes that even
less -- it can't seem to find the template.

   Jake
337cdd270761e0e6f4356de45b04d388?d=identicon&s=25 Jonathan Viney (jonny)
on 2006-01-30 01:08
It seems you can render partials from ActionMailer templates like this:

render :partial => '../shared/template'

Cheers, -Jonny.

Jake Janovetz wrote:
> Can ActionMailer render partials (like .sigs, for example)?  When I try
> to render :partial, I get an error:
>
>   undefined method `controller_path' for SomeNotify:Class
>
> I also tried putting the partial within /shared, but it likes that even
> less -- it can't seem to find the template.
>
>    Jake
This topic is locked and can not be replied to.