title: Same Model for Two belongs_to Associations
body: <p>I have an model <code>PointOfContact</code> which <code>has_many</code> <code>Systems</code>. From the <code>Systems</code> side I want to identify the <code>PointOfContact</code> as either the <code>technical_manager</code> or <code>project_manager</code> (or both). While still only keeping the <code>PointOfContact</code> 1 time in the DB.</p>
  
  <p>My attempt follows:</p>
  
  <pre><code>class System &lt; ActiveRecord::Base
    belongs_to :project_manager, :class_name =&gt; 'PointOfContact'
    belongs_to :technical_manager, :class_name =&gt; 'PointOfContact'
  end
  
  class PointOfContact &lt; ActiveRecord::Base
    has_many :systems
  end
  </code></pre>
  
  <p>When I run my specs (example follows) I can correctly create the <code>System</code> point of contact associations. However, the <code>PointOfContact</code> is not aware of its association with System. Why is that?</p>
  
  <pre><code>@sys = System.create
  @tm = PointOfContact.create
  @pm = PointOfContact.create
  
  @sys.project_manager = @pm
  @sys.technical_manager = @tm
  
  @pm.systems.should have(1).items #&gt; expected 1 items, got 0
  </code></pre>