search for: convention_id

Displaying 2 results from an estimated 2 matches for "convention_id".

Did you mean: connection_id
2006 May 27
7
How should I select rows from a join-model based on more than one association?
...host, who is specific to a workshop being held in a specific convention. For example, Matz may host an "Introduction to Ruby" workshop in RubyConf. And _why may host a the same workshop in RailsConf. This operates through the join-model convention_workshops, which has the following rows: convention_id, workshop_id, host_id, start_time. It belongs_to :convention, :workshop, and :host. Associations make it very easy to select by one association. If I want to get the start_time of all workshops held on RubyConf Matz, I just find RubyConf''s model instance and call #convention_workshops.col...
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