You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me see if I can make a test that reproduces this issue.
FWIW, I believe all the docs and my tests always add a child to a parent (like root.children << child), so in the mean time, changing you code to do that would be a workaround.
Calling depth on child items always returns 0 and ancestry path just returns itself. I expect them to return 1 and [parent, child] respectively.
I have been using collection_select to choose the content of parent_id in my edit views:
My controller then updates the items with the following:
The results of select queries are the following:
Am I doing something wrong here? I would expect setting parent_id would correctly update the hierarchy. I am using Rails 4.
The text was updated successfully, but these errors were encountered: