title: Rails multiple has_one associations
body: <p>I have multiple models with created_by and modified_by columns. This is what I have for a Deal Model.</p>
  
  <pre><code>class Deal
    has_one :user , :foreign_key =&gt; 'created_by'
    has_one :user , :foreign_key =&gt; 'modified_by'
  end
  
  class User
    belongs_to :created_by , :class_name =&gt; 'Deal' , :foreign_key =&gt; 'created_by'
    belongs_to :modified_by , :class_name =&gt; 'Deal' , :foreign_key =&gt; 'modified_by'
  end
  </code></pre>
  
  <p>When I create the deal, looks like it is saving correctly. But in the show view when I try to get <code>@deal.created_by.email</code> I get an "undefined method <code>email</code>" error. Can some tell me how to get this working please? </p>
  
  <p>Also since I have multiple models with these two columns, there can be many belongs_to in User model. Is there an elegant solution for this case?</p>