# Flash messages?

**URL:** <https://www.ruby-forum.com/t/flash-messages/116696>\
**Category:** Rails\
**Created:** [October 8, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/flash-messages/116696 "2007-10-08T20:21:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jamal](https://www.ruby-forum.com/u/jamal)\
**Post date:** [October 8, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/flash-messages/116696/1 "2007-10-08T20:21:21Z")

</div>

Hello,

I’m using flash[:hash] in my application, and I feel like I’m forced to  
make a redirect just to be sure that flash[:hash] doesn’t appear in any  
other views?

flash[:notice] = “ASDDD”  
redirect\_to :action =\> :another\_method\_name  
else  
flash[:error] = “DSADS”  
redirect\_to :action =\> :same\_method\_name

How do you solve this problem, to be sure your flash doesn’t appear in  
any other views, do I need to have unique names for my flash hashes to  
be sure?

Thanks for help!

---

<div class="post-metadata">

**Author:** ![jamal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jamal](https://www.ruby-forum.com/u/jamal)\
**Post date:** [October 8, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/flash-messages/116696/2 "2007-10-08T22:00:07Z")

</div>

On 8 Oct 2007, at 19:21, Jamal S. wrote:

> redirect\_to :action =\> :another\_method\_name  
> else  
> flash[:error] = “DSADS”  
> redirect\_to :action =\> :same\_method\_name
> 
> How do you solve this problem, to be sure your flash doesn’t appear in  
> any other views, do I need to have unique names for my flash hashes to  
> be sure?

Sounds like you want flash.now

---

<div class="post-metadata">

**Author:** ![jamal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jamal](https://www.ruby-forum.com/u/jamal)\
**Post date:** [October 8, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/flash-messages/116696/3 "2007-10-08T23:16:19Z")

</div>

Exactly 🙂
