Flash persisting for two requests

I'm developing on Mac OS X and stuff I'm sticking in flash is sticking around for two requests. For example:

/foo <- sets flash[:notice] /bar <- flash[:notice] is displayed on /baz <- flash[:notice] is also displayed on /fubar <- flash[:notice] is NOT displayed

Any idea why flash is persisting for two requests?

Where/how do you set the flash? I know that setting the flash, and then redirecting, from a before_filter had this effect a while ago (haven't tested recently).

Think you'll find a thread on rails-core about the issue. I think consenus was that this had to be a bug, but have no idea if it's been fixed.

Isak

I’m developing on Mac OS X and stuff I’m sticking in flash is sticking

around for two requests. For example:

/foo ← sets flash[:notice] /bar ← flash[:notice] is displayed on /baz ← flash[:notice] is also displayed on /fubar ← flash[:notice] is NOT displayed

Any idea why flash is persisting for two requests?

Instead of using flash use flash.now[ :notice ]

in the docs

http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000142

it says