I have, perhaps, a unique case when I need a model for two different orders, depending on the model to which it is attached. An example as follows:
class Book acts_as_list :column => :genre, :scope => :genre acts_as_list :column => :author, :scope => :author belongs_to :genre belongs_to :author end
Thus, basically I'm trying to make a model of a book, which is part of two lists, one for the genre page on which it appears, and one for the authorβs page on which it appears.
acts_as_list does not seem to support the use of two position columns, since methods such as move_to_top do not allow you to specify which list should be moved to the beginning.
Does anyone have any suggestions on how I can achieve this? Now I think I will have to create a join table, such as books_genres , which has a position column, but I'm really not too keen on this, since it requires a whole set of additional tables.
source share