title: How do I do two has_many/belongs_to relationships between two models?
body: <p>I've got a <code>Project</code> model, and a <code>Contact</code> model. The Project model has an owner and a client, both of which are <code>Contact</code>s. I've obviously got something ambiguous going on, because if I have a contact and ask for its projects, Rails won't know whether I'm asking for it's projects where it's the client or where it's the owner. So far I've got this:</p>
  
  <pre><code>class Contact &lt; ActiveRecord::Base
    has_many :projects
  end
  
  class Project &lt; ActiveRecord::Base
    belongs_to :owner, :class_name =&gt; 'Contact', :foreign_key =&gt; 'owner_id'
    belongs_to :client, :class_name =&gt; 'Contact', :foreign_key =&gt; 'client_id'
  end
  </code></pre>
  
  <p>How do I make two relationships here?</p>