action mailer default template/location - DONT WANT

59 views
Skip to first unread message

Frantisek Psotka

unread,
Apr 14, 2008, 10:57:22 AM4/14/08
to rubyonra...@googlegroups.com
hello

i want to specify my own location of actionmailer template. how can i do
this?

something like render would be perfect :)

thanks

fero
--
Posted via http://www.ruby-forum.com/.

Julian Leviston

unread,
Apr 14, 2008, 11:16:26 AM4/14/08
to rubyonra...@googlegroups.com
Actionmailer "views" can render partials. Probably best to use this
approach.

Julian.

Learn Ruby on Rails! Check out the FREE VIDS (for a limited time)
VIDEO #4 coming soon!
http://sensei.zenunit.com/

Frantisek Psotka

unread,
Apr 14, 2008, 3:06:21 PM4/14/08
to rubyonra...@googlegroups.com
maybe you dont understand.

my mailer view looks like:
----------------------
<%= @body %>
----------------------

its a bit reduntant to have file with almost no meaning in a project,
but thats not problem, problem is that i want to specify where this
template should be (in a filesystem)

how can i force ActionMailer to search for view on another path ?

thanks again.

fero.

Frantisek Psotka

unread,
Apr 15, 2008, 11:31:40 AM4/15/08
to rubyonra...@googlegroups.com
OK, after few days I discover:

When you in ActionMailer set @body variable, no template is needed...
through this you can render (with erb or...) email any way you want.

hope it helps.

Reply all
Reply to author
Forward
0 new messages