title: Rails grandchildren objects with :has_many, :through
body: <p>I have a schema structured as follows:</p>
  
  <pre><code>class Foo &lt; ActiveRecord::Base
    has_many :foo_bars
    has_many :foo_bar_bazs, :through =&gt; :foo_bars
  end
  
  
  class FooBar &lt; ActiveRecord::Base
    has_many :foo_bars
    belongs_to :foo_bar
  end
  
  Class FooBarBaz &lt; ActiveRecord::Base
    belongs_to :foo_bar
  end
  </code></pre>
  
  <p>I'm trying to do a select on the Foo model - like Foo.find(:all).  Both FooBar and FooBarBaz have the correct foreign key column in the database (foo_id and foo_bar_id, respectively).  So how do I access the child and grandchild objects when I access the grandparent object (Foo)?</p>
  
  <p>In the end I need to be iterate through the Foo objects, then through the Foobar objects, then through the FoobarBaz objects, in three nested loops.</p>