# Render partial from withit mail template

**URL:** <https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617>\
**Category:** Rails\
**Created:** [March 22, 2006, 3:07pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617 "2006-03-22T15:07:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 3:07pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/1 "2006-03-22T15:07:01Z")

</div>

Hi,

I’m trying to include a partial in an email template but it throws me  
this:

undefined method `controller\_path’ for SupportMailer:Class

Extracted source (around line #12):

11:  
12: \<%= render :partial =\> ‘footer’ %\>

I guess email views are a little different from normal ones as they  
don’t seem to have a access to a proper controller (?)

is there a quick way around this?

Jeroen

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 3:34pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/2 "2006-03-22T15:34:09Z")

</div>

Jeroen H. wrote:

> Hi,
> 
> I’m trying to include a partial in an email template but it throws me  
> this:
> 
> undefined method `controller\_path’ for SupportMailer:Class
> 
> Extracted source (around line #12):
> 
> 11:  
> 12: \<%= render :partial =\> ‘footer’ %\>
> 
> I guess email views are a little different from normal ones as they  
> don’t seem to have a access to a proper controller (?)
> 
> is there a quick way around this?
> 
> Jeroen

try ‘…/controller/template’

–  
Agnieszka F.

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 3:40pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/3 "2006-03-22T15:40:45Z")

</div>

Agnieszka F. wrote:

> > 11:

But what if the footer is in /views/support\_mailer ?

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 4:21pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/4 "2006-03-22T16:21:03Z")

</div>

Jeroen H. wrote:

> > > 
> > 
> > try ‘…/controller/template’
> 
> But what if the footer is in /views/support\_mailer ?

Ah this seems to do the trick: \<%= render :partial =\> “./footer” %\>

Jeroen

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 6:11pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/5 "2006-03-22T18:11:19Z")

</div>

I’ve set my mailman prefs so I should be receiving my own mail from  
the maillist however it doesn’t come through. I am using gmail and  
getting my mail with a POP client. Has anybody else had this problem?

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 6:20pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/6 "2006-03-22T18:20:19Z")

</div>

Stephen B. wrote:

> I’ve set my mailman prefs so I should be receiving my own mail from the  
> maillist however it doesn’t come through. I am using gmail and getting  
> my mail with a POP client. Has anybody else had this problem?  
> Allegedly Gmail filters your own posts to mailing lists itself. I don’t  
> use it myself, so I can’t comment further…

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/7 "2006-03-22T18:12:08Z")

</div>

On this page: [http://dev.rubyonrails.org/newticket](http://dev.rubyonrails.org/newticket) theres is a very  
good suggestion that I see if the bug I am reporting is already  
described and ‘Use the search to look for keywords or investigate the  
lists.’.

However I can’t easily find a way to do this on this page or on the  
pages this page links to.

I have a feeling this is a stupid question and I must be missing  
something obvious … hmmm.

Would be nice to have either a search field or a link to a search on  
this page.

---

<div class="post-metadata">

**Author:** ![jeroen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbe5ce/32.png) [@jeroen](https://www.ruby-forum.com/u/jeroen)\
**Post date:** [March 22, 2006, 7:52pm UTC](https://www.ruby-forum.com/t/render-partial-from-withit-mail-template/55617/8 "2006-03-22T19:52:28Z")

</div>

On 3/22/06, Alex Y. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Stephen B. wrote:
> 
> > I’ve set my mailman prefs so I should be receiving my own mail from the  
> > maillist however it doesn’t come through. I am using gmail and getting  
> > my mail with a POP client. Has anybody else had this problem?  
> > Allegedly Gmail filters your own posts to mailing lists itself. I don’t  
> > use it myself, so I can’t comment further…

In my experience, it “archives” your own posts. That is, they don’t  
show up in your inbox, but they are there.
