Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

undefined method 'prepend_sibling' as of 7.0 #339

Closed
jasonsof opened this issue Dec 17, 2018 · 2 comments
Closed

undefined method 'prepend_sibling' as of 7.0 #339

jasonsof opened this issue Dec 17, 2018 · 2 comments

Comments

@jasonsof
Copy link

jasonsof commented Dec 17, 2018

I'm using Rails 5.2.0 and just updated ClosureTree to 7.0 from 6.6.0

prepend_sibling and append_sibling are both returning undefined method errors on a model that has has_closure_tree. Both of those methods were working fine before.

Anyone else experiencing this? is this a defect?

edit: here's a contrived example with an rspec test showing the issue: https://github.com/jasonsof/tree_list

@manme
Copy link

manme commented Feb 21, 2019

@jasonsof I guess this is kind of defect. If you try to add numeric_order: true and if you no need order for roots, additionally: , dont_order_roots: true then it can be solved. This functionality was introduced here

@jasonsof
Copy link
Author

jasonsof commented Mar 8, 2019

Thank you @manme adding numeric_order: true seems to have solved it 👍

I must have missed that option and the new default. I just assumed an updated gem with no changes would work. Thanks again

@seuros seuros closed this as completed Jul 30, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants