You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
is:issue is:open Hash symbolize_keys stringify_keys does not work on nested hashes #253
This matches ActiveSupport, where symbolize_keys/stringify_keys are also shallow; in Facets 4.0 they live in lib/rails. For nested hashes use h.recurse(&:symbolize_keys) or h.recurse(&:rekey).
Activity
trans commentedon Oct 1, 2016
Should they do this? Does ActiveSupport/Rails do this?
ioquatix commentedon Oct 13, 2016
Nope, I don't think it should work on nested hashes. Also,
{stringify/symbolize}_keysis a code smell.. vote to close this issue.ioquatix commentedon Mar 9, 2017
@tilo can you explain your use case a bit more? Did you know JSON and MsgPack have options to load with symbol keys?
trans commentedon Nov 2, 2026
This matches ActiveSupport, where
symbolize_keys/stringify_keysare also shallow; in Facets 4.0 they live inlib/rails. For nested hashes useh.recurse(&:symbolize_keys)orh.recurse(&:rekey).