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?

Thanks,
Joe

Joe R. MUDCRAP-CE wrote:

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?

Thanks,
Joe

flash.keep ?
http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000143

Adrian L. wrote:

Joe R. MUDCRAP-CE wrote:

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?

Thanks,
Joe

flash.keep ?
http://api.rubyonrails.org/classes/ActionController/Flash/FlashHash.html#M000143

Hmm, don’t think so. Unless flash defaults to two actions or something
– I don’t see anything in /config.

Joe

On 10/9/06, Joe R. MUDCRAP-CE [email protected]
wrote:

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

On 10/10/06, Isak H. [email protected] wrote:

/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

Sets a flash that will not be available to the next action, only to the

current.