in this example what if i didn't have a values for science, physics and gravity but had to get it from form what field would i use? my guess any of the 3 variables can be substituted with params[:id] ?
Create a root node:
science = Category.create!(:name => 'Science')
Put a new thing inside this root node:
physics = Category.create!(:name => 'Physics') physics.move_to_child_of(science)
Put another thing inside the “physics” node:
gravity = Category.create!(:name => 'Gravity') gravity.move_to_child_of(physics)