title: Has_Many :Through or :finder_sql
body: <p>I've nailed down what I want, but I can't seem to get it in a way that the rails designers are looking for. Basically, I have (please set aside pluralization/etc issues):</p>
  
  <p>Human
  Relationships (Parent, Offspring)</p>
  
  <p>I'm trying to get all the offsprings for a single parent, and the single parent for many offsprings (assume only one parent per offspring).</p>
  
  <p>I can do this in the following way in the model:</p>
  
  <pre><code>has_one     :parent, :through =&gt; :relationships, :foreign_key =&gt; :human_id, :source =&gt; :source_human
  has_many    :offsprings, :finder_sql =&gt;
            'SELECT DISTINCT offsprings.* ' +
            'FROM humans offsprings INNER JOIN relationships r on ' +
            'r.human_id = offsprings.id where r.source_human_id = #{id}' 
  </code></pre>
  
  <p>I had to do this, because the nicer way to do it:</p>
  
  <pre><code> has_many    :offsprings, :through =&gt; :relationships, :foreign_key =&gt; :source_human_id, :source =&gt; :human
  </code></pre>
  
  <p>Is not possible because foreign keys are ignored in has_many (according to the docs here: <a href="http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many" rel="noreferrer">http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many</a>)</p>
  
  <p>However, now I'm getting this error:</p>
  
  <blockquote>
    <p>DEPRECATION WARNING: String-based
    interpolation of association
    conditions is deprecated. Please use a
    proc instead. So, for example,
    has_many :older_friends, :conditions
    => 'age > #{age}' should be changed to has_many :older_friends, :conditions
    => proc { "age > #{age}" }. (called from irb_binding at (irb):1)</p>
  </blockquote>
  
  <p>However, no matter how I hack at :conditions here, it does not appear that :finder_sql wants to participate. Any thoughts? </p>