Hi all,
Recently I ran into an issue where a flash was being kept during a
redirect chain, and it ended up that one redirect happened inside a
before_filter that returned false.
I chased down the issue, and indeed the flash is not swept if the
filter chain is halted.
Going down the svn logs I found a reference to a ticket where Kaes,
among other things, revised my flash implementation. In this ticket
(3527) he suggests that flash.sweep should always run, but the ticket
is closed and there's no further comment on the issue.
Because I ran into trouble with the ways things are currently
implemented, I'm wondering if maybe we should take Kaes suggestion
and sweep unconditionally.
The only con I can see is that, as things are now, with the sweep not
running after an aborted filter chain, it's possible to handle the
situation manually, that is, just run flash.sweep inside your
aborting filter. So, as things are now you have more control, but you
have to remember to call it.
I believe the expected behavior is for the flash to always be swept.
So I'd give in some control for less surprise.
What do you think?
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core