Rich Collins successfully answered Carl Mercier's question:

I am doing flash[:error] = "Hello World!" in my controller, and it shows properly in my view. However, flash[:error] is only deleted after the -second- time it is shown, which means that if I enter a wrong password, then navigate to the "lost password" page, I get a message saying "Invalid username or password" on -both- pages. What's the deal? AFAIK, Rails is supposed to delete the flash after it is rendered the first time.

People succeed in answering Carl Mercier's questions 23% of the time (5 successes in 22 attempts).

Answers by: Rich Collins | awt

awt's Answer:

Reply by awt 521 days ago

Can you use ruby-debug to put some debugging out put in the code that deletes the variable to see what is happenning?

Reply by Carl Mercier 521 days ago

Isn't supposed to be deleted automatically by Rails? We don't delete it at all on our side, it gets deleted the second time it's shown.

Reply by awt 521 days ago

Yeah I'm saying do rake rails:freeze:edge to get the source in vendor, then put a debug statement in the rails code where the assignment is being made. Unfortunately I don't have enough algorithmic knowledge to determine if in this case flash is behaving properly or not.