# Why can't an HTML ActionMailer view share a partial with a web view?

**URL:** <https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563>\
**Category:** Rails\
**Created:** [June 19, 2009, 1:13am UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563 "2009-06-19T01:13:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [June 19, 2009, 1:13am UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563/1 "2009-06-19T01:13:16Z")

</div>

Railsters:

I’m on the second project in a row where I would like to snip out one  
div from a  
view and mail it around. I want to put the div in a partial and share  
the  
partial into the mail.

Am I misunderstanding things, or does Rails (2.3.2) prevent me from  
doing this?  
If so, why?

–  
Phlip

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [June 19, 2009, 7:51am UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563/2 "2009-06-19T07:51:09Z")

</div>

Phlip wrote:

> Railsters:
> 
> I’m on the second project in a row where I would like to snip out one  
> div from a  
> view and mail it around. I want to put the div in a partial and share  
> the  
> partial into the mail.
> 
> Am I misunderstanding things, or does Rails (2.3.2) prevent me from  
> doing this?  
> If so, why?
> 
> –  
> Phlip

Can’t you put those divs in a helper and use that?

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [June 19, 2009, 10:29pm UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563/3 "2009-06-19T22:29:50Z")

</div>

> Railsters:
> 
> I’m on the second project in a row where I would like to snip out one div from a  
> view and mail it around. I want to put the div in a partial and share the  
> partial into the mail.
> 
> Am I misunderstanding things, or does Rails (2.3.2) prevent me from doing this?  
> If so, why?

Bump?

Or is Rails vs MVC too sensitive a topic? (-;

–  
Phlip

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [June 19, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563/4 "2009-06-19T22:50:07Z")

</div>

On Jun 19, 9:28 pm, Phlip [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Railsters:
> 
> > I’m on the second project in a row where I would like to snip out one div from a  
> > view and mail it around. I want to put the div in a partial and share the  
> > partial into the mail.
> 
> > Am I misunderstanding things, or does Rails (2.3.2) prevent me from doing this?  
> > If so, why?

Works for me. What have you been trying?

Fred

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [June 19, 2009, 11:17pm UTC](https://www.ruby-forum.com/t/why-cant-an-html-actionmailer-view-share-a-partial-with-a-web-view/170563/5 "2009-06-19T23:17:55Z")

</div>

Frederick C. wrote:

> Works for me. What have you been trying?

We were trying an awesome new plugin called pilot\_error…

Beyond that, at my last gig we might have mangled the snot out of the  
paths to  
the templates, so maybe that explains the perceived problem.

I will try it your way and see what happens tx!

–  
Phlip
