daze
2010-Dec-28 03:50 UTC
acts_as_list - can you use it "twice" for a model, like one using :position and another using :rank?
Let''s say I have this set up: an article belongs to a section If I go to sections/show, I would see a list of articles belonging to that section. I want to be able to modify the position of each article within that section, so in the model for article, I''d put... acts_as_list :scope => :section right? Now what if I ALSO wanted, when I go to articles/index, to see the list of all articles except based on some other column value, like :rank. It would work the same way... but I''m not sure if this is possible with acts_as_list. Can acts_as_list do this? Or is there a better solution? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
nkburdick
2012-Jul-04 18:29 UTC
Re: acts_as_list - can you use it "twice" for a model, like one using :position and another using :rank?
Daze, Did you ever work this out? I have the same question. Thanks, Nick On Monday, December 27, 2010 7:50:12 PM UTC-8, daze wrote:> > Let''s say I have this set up: > an article belongs to a section > > If I go to sections/show, I would see a list of articles belonging to > that section. I want to be able to modify the position of each > article within that section, so in the model for article, I''d put... > > acts_as_list :scope => :section > > right? > > Now what if I ALSO wanted, when I go to articles/index, to see the > list of all articles except based on some other column value, > like :rank. It would work the same way... but I''m not sure if this is > possible with acts_as_list. > > Can acts_as_list do this? Or is there a better solution?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/feGuE_0-RLwJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.