lib/parentry/strategy/array/instance_methods.rb in parentry-1.6.0 vs lib/parentry/strategy/array/instance_methods.rb in parentry-1.7.0

- old
+ new

@@ -13,10 +13,10 @@ end def cascade_parentry old_path, new_path = saved_changes[parentry_column] parentry_scope.where( - ["#{parentry_column} @> ARRAY[:tree] AND id != :id", { tree: old_path, id: id }] + ["#{parentry_column} @> ARRAY[:tree] AND id != :id", { tree: old_path, id: }] ).update_all( [ "#{parentry_column} = array_cat(ARRAY[?], #{parentry_column}[?:array_length(#{parentry_column}, 1)])", new_path, old_path.size + 1 ]