Conflict with serialize option
MarcelEeken opened this issue · 6 comments
If you use this gem in a model in combination with a serialized field, http://apidock.com/rails/ActiveRecord/Base/serialize/class, the following function can cause conflicts on your data where you are unable to deserialize the data: https://github.com/take-five/acts_as_ordered_tree/blob/master/lib/acts_as_ordered_tree/instance_methods.rb#L422
We had this in our application were the move or reorder operation would cause the correct data that was already in the database to be overwritten update_changed_attributes function.
Hi Marcel
Could you please provide minimal code to reproduce the bug?
/cc @vkuznetsov please take a look too
Hi. I understood the problem, will try to fix soon.
@MarcelEeken we are going to change behaviour of move_to_*
methods so they won't save model attributes except those related to tree state (parent_id
, position
etc). It should help you
Thanks for the quick fix.
@MarcelEeken please checkout release 1.2.0