title: rails multiple level include on nested association
body: <p>I have 3 tables, comments, users, and images.  </p>
  
  <p>I'm trying to formulate a query that will product arrays of comments on a post that includes the commentator's information and a avatar.</p>
  
  <p>The avatar is stored in the images table, while the users table contains the user info plus a reference id to the image object that stores the users avatar.</p>
  
  <p>Each comment has a author id that is referencing an object in the user table.</p>
  
  <p>This is what I have so far</p>
  
  <pre><code>@comments = Comment.all(:include =&gt; [:user =&gt; :images], 
              :conditions =&gt; {
                :source =&gt; p[:source], 
                :source_id =&gt; p[:id], 
                :users =&gt; {:id =&gt; p[:user_id]}, /* if this result is *user */
                :images =&gt; {????} /*essentially i need images.id = *user.profile_id */
                })
  </code></pre>
  
  <p>Can't get the image part to work, can someone show me how?</p>