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

17 commits

Author SHA1 Message Date
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Akira Matsuda
630cc857c9 "Use assert_nil if expecting nil from ...:in `...'. This will fail in MT6." 2016-12-25 09:59:16 +09:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
35b3de8021 applies new string literal convention in actionpack/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:54:50 +02:00
Rafael Mendonça França
bf876aa0b6 Make flash messages cookie compatible with Rails 4
In #18721 we removed the discard key from the session hash used to flash
messages and that broke compatibility with Rails 4 applications because they
try to map in the discarded flash messages and it returns nil.

Fixes #24726.
2016-05-06 15:12:31 -05:00
Samuel Cochran
3f528e371c Migrate old flash behaviour 2015-01-30 09:47:03 +11:00
Samuel Cochran
f7adb34999 Discard from flash before persisting in session 2015-01-29 23:18:55 +11:00
Rafael Mendonça França
3c60fb429d Make FlashHash#key? work with symbol and string
Closes #17586
2014-11-11 01:04:06 -02:00
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