-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4-3] add back ancestor_ids_in_database #637
[4-3] add back ancestor_ids_in_database #637
Conversation
6a6fe8c
to
2310b79
Compare
update:
|
2310b79
to
f17aba9
Compare
update:
|
f17aba9
to
4679313
Compare
this pr got too big. having trouble reconciling why |
I tried with After setting # foo has some children, and bar is in another tree.
foo.descendants # => some children
child = foo.descendants.first
foo.parent_id = bar.id
foo.descendants # => empty (expect some children)
child.parent == name_2 # => true |
The minimal change I can make is: Descendants worked a little differently before and after 589, so I'm trying to uncover whether the problem was introduced in that PR or if it was hidden in the code. I have a feeling there was an issue before. As you can tell from this branch, it started to get very big. I am also adding a number of tests that exercise the Thank you for your help and patience. |
@znz Are you able to add a test case that will fail?
Maybe you can see how I am testing in #638 and will have better luck than I do with this descendant issue.
Thanks |
found the culprit to the problem.
I am targeting 4.3.1, but I do wonder if 5.0 (master) would works for you. (assuming ancestor_ids_before_save works) |
this was removed by 0fcd12f stefankroes#589 adding fields back. added tests to exercise
4679313
to
e8cb9a2
Compare
you can find this on stefankroes/ancestry gem 'ancestry', git: 'https://github.com/stefankroes/ancestry.git', branch: '4-3-stable' let me know if you have any other problems |
Thanks.
|
@znz Hope 4.3.1 works for you. |
backport of #643
this was removed by #589
adding fields back.
added tests to exercise
Fixes #636 /cc @znz