Hello all,
While manually entering urls into my local browser, my flash messages
are sticking around for two requests instead of clearing right away
after the initial display.
An example to illustrate, if my controller method is "test_notice" as
shown below my view test_notice.rhtml will display both "yes" and
"no"
at the same time if the first url has a value parameter (which sets
"yes") and the second url does not (which sets "no"). The
"yes" is
not being cleared.
What is causing this, or am I miunderstanding how flash is supposed to work?
Thanks for any advice
--Brian
# example controller method
def test_notice
flash["yes_notice"] = "yes" if params[:value]
flash["no_notice"] = "no" if !params[:value]
end
# After two requests both flash["yes_notice"] and
flash["no_notice"]
have values at the same time.