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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---