title: Rails 3 activerecord children of children records
body: <p>My models:</p>
  
  <pre><code>class Person
   has_many :projects
  
  class Project
   belongs_to :person
   has_many :tasks
  
  class Task
   belongs_to :project
  </code></pre>
  
  <p>Given a <code>person</code> instance, <code>person = Person.find(10)</code>, is there an easy way to access all the <code>tasks</code> that belongs to all the <code>projects</code> for the <code>person</code>? In addition, I would need to further filter the <code>projects</code> results if <code>projects.duration &lt; x days</code> sort of thing. I could try to manually construct the resultset by <code>person.projects</code> and then looping through each <code>project</code> to get the associated <code>tasks</code> but I'm hoping there is another simpler more elegant syntax that I'm not aware of. BTW, <code>person.projects.tasks</code> doesn't work.</p>