lib/parentry/strategy/array/instance_methods.rb in parentry-0.5.0 vs lib/parentry/strategy/array/instance_methods.rb in parentry-1.0.0

- old
+ new

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