lib/parentry/strategy/ltree/instance_methods.rb in parentry-1.6.0 vs lib/parentry/strategy/ltree/instance_methods.rb in parentry-1.7.0
- old
+ new
@@ -11,14 +11,14 @@
end
def cascade_parentry
old_path, new_path = saved_changes[parentry_column]
parentry_scope.where(
- ["#{parentry_column} <@ :tree AND id != :id", { tree: old_path, id: id }]
+ ["#{parentry_column} <@ :tree AND id != :id", { tree: old_path, id: }]
).update_all(
[
"#{parentry_column} = :new_path || subpath(#{parentry_column}, nlevel(:old_path))",
- { new_path: new_path, old_path: old_path }
+ { new_path:, old_path: }
]
)
end
def subtree_conditions