title: Rails Model has_many with multiple foreign_keys
body: <p>Relatively new to rails and trying to model a very simple family "tree" with a single Person model that has a name, gender, father_id and mother_id (2 parents). Below is basically what I want to do, but obviously I can't repeat the :children in a has_many (the first gets overwritten).</p>
  
  <pre><code>class Person &lt; ActiveRecord::Base
    belongs_to :father, :class_name =&gt; 'Person'
    belongs_to :mother, :class_name =&gt; 'Person'
    has_many :children, :class_name =&gt; 'Person', :foreign_key =&gt; 'mother_id'
    has_many :children, :class_name =&gt; 'Person', :foreign_key =&gt; 'father_id'
  end
  </code></pre>
  
  <p>Is there a simple way to use has_many with 2 foreign keys, or maybe change the foreign key based on the object's gender? Or is there another/better way altogether?</p>
  
  <p>Thanks!</p>