ClosureTree/closure_tree

undefined method 'prepend_sibling' as of 7.0

jasonsof opened this issue · 2 comments

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 commented

@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

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