# ActionMailer view overwriting ActionController view?

**URL:** <https://www.ruby-forum.com/t/actionmailer-view-overwriting-actioncontroller-view/80600>\
**Category:** Ruby\
**Created:** [December 29, 2006, 1:50am UTC](https://www.ruby-forum.com/t/actionmailer-view-overwriting-actioncontroller-view/80600 "2006-12-29T01:50:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 1:50am UTC](https://www.ruby-forum.com/t/actionmailer-view-overwriting-actioncontroller-view/80600/1 "2006-12-29T01:50:20Z")

</div>

Hi All,

I’m having a bizarre problem. I have a page that let’s you share a  
link from the current page with other users. You can share with other  
users of the site (by selecting them from your list of friends) or  
arbitrary users by entering e-mail addresses. In both scenarios the  
site sends e-mail to the users you chose to share with… for some  
reason, when I send a set of e-mails to offsite users, the view of the  
page gets corrupted and the next time I visit the page, the output of  
the view associated with the share controller is replaced with the  
previous output of the view associated with the mailer.

I’ve tried adding a breakpoint and doing “render\_to\_string :template =\>  
‘foo’” (where foo is the view associated with the template) and sure  
enough, it returns the (apparently) cached output from the last e-mail  
sent.

Has anyone seen anything like this before, and/or does anyone have any  
suggestions on where to look next?

## Thanks,

John

> **[Default Page](http://www.rubyroll.com/)**
>
> ASP.NET hosting, SQL hosting, AJAX Hosting, Silverlight hosting, LINQ Hosting, Microsoft Windows 2012 hosting, iis8 hosting, Windows 2012 R2 hosting, iis8.5 hosting.

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [December 29, 2006, 2:18am UTC](https://www.ruby-forum.com/t/actionmailer-view-overwriting-actioncontroller-view/80600/2 "2006-12-29T02:18:24Z")

</div>

removed\_email\_address@domain.invalid wrote:

> Hi All,

Hi.

> Has anyone seen anything like this before, and/or does anyone have any  
> suggestions on where to look next?

Yes. Try the Rails mailing list.

> **[Ruby on Rails](https://rubyonrails.org)**
>
> A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

–  
James B.

“I was born not knowing and have had only a little  
time to change that here and there.”

- Richard P. Feynman
