Heyo, I have a table called Teams which I hope to hold multiple trees (using :scope => :tree_id). My table looks like this... ID NAME LFT RGT PARENT_ID TREE_ID 17 My first team 1 6 NULL 17 18 Soon to break away 2 5 17 17 19 Child of soon to... 3 4 18 17 If I wanted to promote "Soon to break away" and make it a root I''d try something like... >> t = Team.find(18) >> t.move_to_right_of(17) => #<Team id: 17, name: "My First Team", lft: 1, rgt: 2, parent_id: nil, lock_version: 1, created_at: "2008-03-24 13:27:30", updated_at: "2008-03-24 13:27:30", tree_id: 17> Now the table looks like... ID NAME LFT RGT PARENT_ID TREE_ID 17 My first team 1 2 NULL 17 18 Soon to break away 3 6 NULL 17 19 Child of soon to... 4 5 18 17 So since 18 is now a root... I was expecting his lft to adjust itself to 1 and rght to adjust to maxright. I was also expecting row 18 and 19 to adjust their tree_ids to 18. Oy. Am I approaching this the wrong way? -Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20080324/0965bf6b/attachment.html