# Flash.keep not working with render\_component

**URL:** <https://www.ruby-forum.com/t/flash-keep-not-working-with-render-component/61714>\
**Category:** Rails\
**Created:** [May 26, 2006, 1:57pm UTC](https://www.ruby-forum.com/t/flash-keep-not-working-with-render-component/61714 "2006-05-26T13:57:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmyether](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9a140/32.png) [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Post date:** [May 26, 2006, 1:57pm UTC](https://www.ruby-forum.com/t/flash-keep-not-working-with-render-component/61714/1 "2006-05-26T13:57:35Z")

</div>

Using Rails 1.1.2 and ruby 1.8.4

I’m having a weird issue with the flash when using render\_component for  
an action inside different controller than the one from which you  
render. I’m passing an object via flash across a couple of actions (new  
and create) behind the scenes using flash.keep(:object). It works fine  
if the component I’m rendering is in the same controller from which it  
is being called, but if I try to render a component from a different  
controller, the flash is somehow getting cleared (despite flash.keep  
being used in both rendered actions).

I know there was a bug with render\_component and flash back before 1.0,  
but it looks as though that has been fixed. Anyone else run into this?

---

<div class="post-metadata">

**Author:** ![jimmyether](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9a140/32.png) [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Post date:** [May 26, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/flash-keep-not-working-with-render-component/61714/2 "2006-05-26T17:26:20Z")

</div>

Agh… nevermind. Found the issue. Silly mistake. Exceptions for things  
that go wrong with render\_component can be a bit misleading.
