This project is archived and is in readonly mode.
HashWithIndifferentAccess should override #store
-
Santiago Pastorino
- Importance changed from to Low
Can you provide a patch with a test case? or a test case only?.
Thank you. -
Andrea Campi
- Tag changed from activesupport, hashwithindifferentaccess, params to activesupport, hashwithindifferentaccess, params, patched
There you go.
I implemented #store the same as #[]= but maybe one should be an alias to the other?
Would anybody ever subclass HashWithIndifferentAccess and override just one of #[]= and #store? -
Álvaro Bautista
- Tag changed from activesupport, hashwithindifferentaccess, params, patched to activesupport, hashwithindifferentaccess, params
I agree, since fetch is already overridden.
It may not be needed, as it is quite straightforward, but I attach a patch for it anyway.
-
Álvaro Bautista
My patch was, in fact, not needed.
I'm sorry, I should have refreshed the ticket page before submitting.
-
Andrea Campi
- Tag changed from activesupport, hashwithindifferentaccess, params to activesupport, hashwithindifferentaccess, patch
-
Andrea Campi
No worries :)
-
greg (at araelium)
Thanks for that Andrea.
-
Santiago Pastorino
- State changed from new to open
- Milestone cleared.
- Assigned user set to Santiago Pastorino
An alias is the preferred way to go here ;)
-
Andrea Campi
Thought so :) There you go.
-
Repository
- State changed from open to resolved
(from [d80afed620dde5b9356c883ae187db2332d4c18e]) Override #store to be consistent with #[].
[#5775 HashWithIndifferentAccess should override #store state:resolved]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/d80afed620dde5b9356c883ae187db... -
Repository
(from [61fc0f0ba0afb630efd898b5913bee32e2b0ad11]) Override #store to be consistent with #[].
[#5775 HashWithIndifferentAccess should override #store state:resolved]
Signed-off-by: Santiago Pastorino santiago@wyeworks.com
http://github.com/rails/rails/commit/61fc0f0ba0afb630efd898b5913bee... -
Ryan Bigg
- Tag changed from sheepskin boots, activesupport, hashwithindifferentaccess, patch to activesupport hashwithindifferentaccess patch
Automatic cleanup of spam.
