lib/parentry/strategy/ltree/instance_methods.rb in parentry-1.3.0 vs lib/parentry/strategy/ltree/instance_methods.rb in parentry-1.4.0
- old
+ new
@@ -5,10 +5,10 @@
def parse_parentry(input = parentry)
input.to_s.split('.').map(&:to_i)
end
def compute_parentry
- parent.present? ? "#{parent.parentry}.#{id}" : "#{id}"
+ parent.present? ? "#{parent.parentry}.#{id}" : id.to_s
end
def cascade_parentry
old_path, new_path = saved_changes[parentry_column]
parentry_scope.where(