Hello all, I''m having trouble using acts_as_list with acts_as_tree to order the "children". I''ve found a few old posts on the web that seem to indicate that this once worked. class Whatever < ActiveRecord::Base acts_as_tree :order => :position acts_as_list :scope => :parent_id Although the ''position'' field is being populated, it appears to be ignoring the :scope. This is happening in rel_1-2-1 and edge. Is anyone currently using this configuration? Any ideas? As a side note, the :scope on acts_as_list doesn''t work if it is passed as a string, but does work if using a symbol. A ticket/patch has been posted. http://dev.rubyonrails.org/ticket/7380 However, this does not solve the above problem :) Thanks! - Brian --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Nevermind... it''s working perfectly. The position ids generated by my tests were throwing me off. Writing more extensive tests has shown me the light :) - Brian On Jan 25, 2:26 pm, "Brian D. Burns" <wizard...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all, > > I''m having trouble using acts_as_list with acts_as_tree > to order the "children". I''ve found a few old posts on the web > that seem to indicate that this once worked. > > class Whatever < ActiveRecord::Base > acts_as_tree :order => :position > acts_as_list :scope => :parent_id > > Although the ''position'' field is being populated, > it appears to be ignoring the :scope. > This is happening in rel_1-2-1 and edge. > > Is anyone currently using this configuration? > Any ideas? > > As a side note, the :scope on acts_as_list doesn''t work > if it is passed as a string, but does work if using a symbol. > A ticket/patch has been posted.http://dev.rubyonrails.org/ticket/7380 > However, this does not solve the above problem :) > > Thanks! > - Brian--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Apparently Analagous Threads
- acts_as_tree & acts_as_list for a single model?
- acts_as_tree, acts_as_list and is invincible (help!)
- acts_as_list / acts_as_tree / acts_as_nested_set - which one
- Using set_primary_key breaks acts_as_tree with non-integer column
- counter_cache is not looking for children_count with acts_as_tree