Forum: Ruby on Rails acts_as_list sort by multiple items

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5eee0426790b5933f417a60bf3634c82?d=identicon&s=25 Tod Mcintyre (tizzod)
on 2009-02-12 15:59
I have a Person model and I'm using acts_as_list so I can have drag/drop
positioning of people.  The only thing is, I want to be able to
differentiate between male and female, ie. sort males separately from
females.  It seems completely useless to have two separate models since
all the other attributes of a person are the same (name, address etc)
Does acts_as_list allow ordering by, say, position and sex?

In writing this, I also just thought, maybe I can create a person model
and have a male/female model extend from this with attribute sex, then
use acts_as_list on the male/female model.  I'm not sure i would know
how to design the db for that.

Any thoughts on this?
This topic is locked and can not be replied to.