Forum: Ruby on Rails Sorting Polymorphic Associations

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.
Joe C. (Guest)
on 2006-05-18 19:00
Recently, I converted a single table inheritance design over to
polymorphic associations as that made a lot more sense from a database
perspective.  One of the features of the ui, a drag and dropable list of
items, needs to be completely reworked though.

Instead of having one table with a "sort" column, I have 1 polymorphic
table "items" acting as a pointer to 3 or 4 other tables.  This makes
the design of the drag and drop sort a lot more troublesome.

I was previously sorting the results of my find based on the "sort"
column.  Now I am using a collect to gather all the associations of
"item" and I'm baffled how to implement this one.

Any ideas as to how I would tackle this?
This topic is locked and can not be replied to.