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
For the record, I'm currently monkey-patching to work around this issue. Feel free to use this in the implementation.
# in an initializer:moduleClosureTreemoduleNumericDeterministicOrderingdef_ct_reorder_siblings(minimum_sort_order_value=nil)_ct.reorder_with_parent_id(_ct_parent_id,minimum_sort_order_value)if !destroyed? && _ct.order_columnself[_ct.order_column]=self.class.where(self.class.primary_key=>id_in_database).pick(_ct.order_column)clear_attribute_change(_ct.order_column)endendendend
Say I have a model with numeric_order option:
With this setting we lose dirty tracking after setting the parent:
All dirty tracking is lost since it ends up calling
reload
internally.Perhaps this code could just reload the order attribute instead of the entire record? This way dirty tracking would persist.
The text was updated successfully, but these errors were encountered: