Forum: Ruby on Rails session not storing flash message

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Acd297b1cff424c5967c2027ba0dcbcf?d=identicon&s=25 rd (Guest)
on 2007-05-18 09:14
(Received via mailing list)
Hi all,

I faced a problem while writing functional tests, where the session
wasn't storing the flash message, even when the message was shown to
be stored in the flash hash.

See the code :

This wasn't working :

flash[:notice] = "Hi there"
assert_equal "Hi there", flash[:notice]

But this  was :

flash[:notice] = "Hi there"
session["flash"] = {:notice => "Hi there"}
assert_equal "Hi there", flash[:notice]

Did anybody ever faced the same problem ?

This topic is locked and can not be replied to.