From tory.long at gmail.com Thu Mar 6 14:34:19 2008 From: tory.long at gmail.com (Tory Long) Date: Thu, 6 Mar 2008 14:34:19 -0500 Subject: [Betternestedset-talk] Replicating a nested set structure to another model Message-ID: Hi - first off BNS is awesome. We are using it extensively in our project and are very happy. What I am trying to accomplish is replicating a nested set structure from one model to another. Currently, to do this, I am rebuilding the tree structure entirely, as I am not able to simply copy nodes and their identity (parent_id, rgt, lft) based off the "template" nested set in the original model. This is very expensive code-wise, and the alternative (simply copying the lft/rgt/parent_id structure) would allow for what I need. BetterNestedSet enforces "move_to_child_of" and that seems to be the prohibiting factor from simply creating the new structure with parent_id/lft/rgt easily replicated through replicating or populating those fields to a similar structure as the original. Does anyone have a more graceful solution for this? While functional, rebuilding this structure with node-by-node traversal is not ideal. Thanks, Tory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/betternestedset-talk/attachments/20080306/714ded68/attachment.html From giorgian at gmail.com Tue Mar 18 12:50:58 2008 From: giorgian at gmail.com (Pietro Giorgianni) Date: Tue, 18 Mar 2008 17:50:58 +0100 Subject: [Betternestedset-talk] when the table doesn't exist Message-ID: <871w68asct.fsf@giorgian.widge.org> A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available Url : http://rubyforge.org/pipermail/betternestedset-talk/attachments/20080318/cadfeb2b/attachment.bin From hukl at medienhaus.udk-berlin.de Wed Mar 19 15:16:47 2008 From: hukl at medienhaus.udk-berlin.de (John-Paul Bader) Date: Wed, 19 Mar 2008 20:16:47 +0100 Subject: [Betternestedset-talk] Sortable Sets Message-ID: <9B3FAD14-7316-43A6-A318-1B45B250CFD8@medienhaus.udk-berlin.de> Hey there, I just subscribed so i hope this question isn't redundant. I'm trying to implement a sortable nested set. I've already got an application with better_nested_set in place. I also got a nice nested