How do you CRUD Acts_As_Tree data?

I’m trying to create a simple category structure using acts_as_tree.
I’ve been able to create the model, view, controller etc. but how do
you create the edit page so you can identify the parent? I mean,
what’s the best process of adding/editing records and associating them
to another category in the tree? Do I have to pass in a parent_id
before I add a new record, or can I use some kind of select box, etc?
Any best practices here?

On Nov 28, 2007 7:00 PM, Michael A. [email protected] wrote:

I’m trying to create a simple category structure using acts_as_tree.
I’ve been able to create the model, view, controller etc. but how do
you create the edit page so you can identify the parent? I mean,
what’s the best process of adding/editing records and associating them
to another category in the tree? Do I have to pass in a parent_id
before I add a new record, or can I use some kind of select box, etc?
Any best practices here?

I’d just add a parent category drop down menu to my category add form.
If you pick nothing you make the new category a top level category.
Otherwise it’s a child of the selected parent.


Greg D.
http://destiney.com/