Does anyone have any experience using acts as tree and acts as list
together? My model looks like
class ModelName < ActiveRecord::Base
acts_as_tree :order => “position”
acts_as_list :scope => :parent
end
the table has fields
position, :integer
parent_id, :integer
This kinda of seems to work. Except if I do something like
@modelinstance.children.first.move_lower #parent_id = 0
But now
@modelinstance.children.first.position = 1 # which is correct now, it
used to be 0
@modelinstance.children.second.position = 1 # bad, can’t have to things
with same position
Any tips for the right way to do this?
Thanks