title: Cancan authorizing child state
body: <p>My setup: Rails 3.0.9, Ruby 1.9.2, Cancan 1.6.5</p>
  
  <p>My models:</p>
  
  <pre><code>class User
   has_many :projects
  
  class Project
   has_many :tasks
   belongs_to :user
  
  class Task
   belongs_to :project
  </code></pre>
  
  <p>ability.rb</p>
  
  <pre><code>can :manage, Task, :project =&gt; { :user_id =&gt; user.id } 
  </code></pre>
  
  <p>What I need is to only allow access to a <code>task</code> if <code>user</code> and <code>project</code> are authorized and <code>project</code> has a certain status determined by a <code>project</code> instance method like <code>active?</code> (I have a reason for not making it just an attribute). What's the syntax for specifying the ability?</p>