Flash messages?

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!

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

Exactly :slight_smile: