1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Guillermo Iguaran
a6ce984b49 Convert FlashHash in a Hash with indifferent access 2014-02-11 01:54:17 -08:00
James Coglan
654a2de7a9 Store FlashHashes in the session as plain hashes rather than custom objects with unstable class names and instance variables.
Refactor FlashHash to take values for its ivars in the constructor, to pretty up FlashHash.from_session_value.

Remove stale comment on FlashHash: it is no longer Marshaled in the session so we can change its implementation.

Remove blank lines I introduced in controller/test_case.rb.

Unit tests for FlashHash#to_session_value.

Put in a compatibility layer to accept FlashHash serializations from Rails 3.0+.

Test that Rails 3.2 session flashes are correctly converted to the new format.

Remove code path for processing Rails 3.0 FlashHashes since they can no longer deserialize.

Fix session['flash'] deletion condition: it will never be empty?, it will either be nil or a hash with 'discard' and 'flashes' keys.
2012-11-09 11:55:18 +00:00
Aaron Patterson
bdfd11e6da mutations on the underlying hash should also mutate the discard set 2011-12-28 18:33:44 -08:00
Aaron Patterson
ffad4927b1 mutations can't be done without the consent of our proxy object. This
is one benefit of choosing composition over inheritance.
2011-12-28 18:21:35 -08:00
Aaron Patterson
1e90229e04 many args does not make sense with the current implementation because of how use works 2011-04-06 18:13:16 -07:00
Aaron Patterson
32f876786a getting the flash hash under test 2011-04-06 18:01:03 -07:00