Did not rename child_ancestry => child_ancestry_in_database.
I went back and forth on this one.
I put in a note to hopefully help anyone confused by the code using _in_database.
Now throwing an error from child_ancestry_before_last_save for newly saved records. (rails >= 6.1)
This error is thrown if this scope is used from an after_save hook on a new record.
Either change the hook to an after_update or guard with a previously_new_record?.
Throwing an error because for new records, this value may point to root and bad things could happen.
Don't think these methods are used by extension developers.
unscoped_descendants_before_save
=>unscoped_descendants_before_last_save
descendant_before_save_conditions
=>descendant_before_last_save_conditions
child_ancestry_before_save
=>child_ancestry_before_last_save
Did not rename
child_ancestry
=>child_ancestry_in_database
. I went back and forth on this one. I put in a note to hopefully help anyone confused by the code using_in_database
.Now throwing an error from
child_ancestry_before_last_save
for newly saved records. (rails >= 6.1) This error is thrown if this scope is used from anafter_save
hook on a new record. Either change the hook to anafter_update
or guard with apreviously_new_record?
. Throwing an error because for new records, this value may point toroot
and bad things could happen.