search for: companyheadquart

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

2009 Jan 18
5
Modeling complex associations
Hi, Is there any default way to model something like the following situation in ActiveRecord?: A company has_many :buildings which are associated to :company, e.g. in a polymorphic way. Moreover one and only one of the buildings is the company''s headquarter. Thinking in terms of the database, I''d prefer to add an owning association, an thus have a has_many :buildings plus a