Displaying 1 result from an estimated 1 matches for "root2child".
Did you mean:
root1child
2006 Jul 18
1
Bad values for acts_as_nested_set?
...uot;created_at", :datetime
end
Some code to reproduce the results:
root1 = Element.create(:name => "root1")
root1.add_child(Element.create(:name => "root1child")
root2 = Element.create(:name => "root2")
root2.add_child(Element.create(:name => "root2child")
Data view:
ID | PARENT_ID | LFT | RGT | NAME
1 | 0 | 1 | 4 | root1
2 | 1 | 2 | 3 | root1child
3 | 0 | 1 | 4 | root2
4 | 1 | 2 | 3 | root2child
Which produces this query when asking for root2.all_children:
SELECT * FROM ke...