Nested keys within hash are getting mutated
yogeshjain999 opened this issue · 5 comments
Conversion module is mutating nested keys within given hash to string always.
For example, reform has a test case for populating nested property in here. It fails when we upgrade representable
to 3.1.0
Any example or test case? 🍻
Yes, I created a demo branch in reform and pointed it to representable
master.
trailblazer/reform@master...yogeshjain999:representable-bug
Failing test case in reform - test/populator_skip_test.rb
Test run - https://github.com/yogeshjain999/reform/runs/2202613294
BTW, I also had to require "representable"
explicitly as I was getting an exception
uninitialized constant Representable::Decorator::Cached
PR causing undefined constant issue - #235 (this line)
PR causing mutation issue - #237
cc @seuros
Interesting ! Should we drop the conversion and move to symbols only ?
If i remember correctly , i changed it because a Rails version stopped using hashwithindifferentaccess in some part of the code.
Agree, we should only convert top level keys. Can we also drop 3.1.0
release commit as there is no gem published with it ?
Sure, feel free to delete the tag, @yogeshjain999