# Action mailer default template/location - DONT WANT

**URL:** <https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736>\
**Category:** Rails\
**Created:** [April 14, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736 "2008-04-14T16:57:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b2d939/32.png) [@fero](https://www.ruby-forum.com/u/fero)\
**Post date:** [April 14, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736/1 "2008-04-14T16:57:22Z")

</div>

hello

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

something like render would be perfect 🙂

thanks

fero

---

<div class="post-metadata">

**Author:** ![fero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b2d939/32.png) [@fero](https://www.ruby-forum.com/u/fero)\
**Post date:** [April 14, 2008, 5:17pm UTC](https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736/2 "2008-04-14T17:17:08Z")

</div>

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/](http://sensei.zenunit.com/)

---

<div class="post-metadata">

**Author:** ![fero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b2d939/32.png) [@fero](https://www.ruby-forum.com/u/fero)\
**Post date:** [April 14, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736/3 "2008-04-14T21:06:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/b2d939/32.png) [@fero](https://www.ruby-forum.com/u/fero)\
**Post date:** [April 15, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/action-mailer-default-template-location-dont-want/134736/4 "2008-04-15T17:31:40Z")

</div>

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.

Frantisek P. wrote:

> 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.
