acts_as_list - can you use it "twice" for a model, like one using :position and another using :rank?

9 views
Skip to first unread message

daze

unread,
Dec 27, 2010, 10:50:12 PM12/27/10
to Ruby on Rails: Talk
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?

nkburdick

unread,
Jul 4, 2012, 2:29:34 PM7/4/12
to rubyonra...@googlegroups.com
Daze,

Did you ever work this out?  I have the same question.

Thanks,
Nick
Reply all
Reply to author
Forward
0 new messages