search for: conventions_year

Displaying 1 result from an estimated 1 matches for "conventions_year".

Did you mean: conventions_years
2006 May 08
2
Creating a "Foo has_many bars" association where bar isn''t a model.
Hi Let''s say we have model Foo. Each Foo instance can have several bars. Those bars are primitive, so they shouldn''t be models. For example, Foo might be a type of convention, and the bars might be years the convention was held in. Naively, we would have a conventions_years date, and put: has_many :years inside class Convention. But then we''d get an error, since for has_many to work, there must be a Year model. Which is silly: why would we have a Year model, then get the actual year by Year#year...? So what''s the Railish take on this? Can you ha...