Nuno
2006-May-24 16:22 UTC
[Rails] acts_as_list with scope for two fields without parent/child
Hello, I''ve a model which doesn''t rely on parent/child relationship (it''s a list of news articles) Each article has a lang char(2) which identify the language of the article, and a art_type char (2) which identify the place the article must be displayed (in the shop (SH), or in the website (WE)) So, the news articles order should be scoped on lang + art_type but I would like to avoid setting up two new models (two tables), one for the lang and the other for the art_type (these two tables would just contain 2 records each (2 languages and 2 art_types), that look like a little too mush "heavy" for a so simple problem) My question is : can I scope on two field of the news article list without setting up a relation ship with two others tables ? Thanks -- Posted via http://www.ruby-forum.com/.