title: Help with rails declarative_authorization
body: <p>I cant get this rule to be enforced at all... it allows anyone to get to this action.</p>
  
  <p>Here's my rule </p>
  
  <pre><code>role :student do
      has_permission_on :relationships do 
        to :index
        if_attribute :student_id=&gt; is {user.student.id}
      end
    end
  </code></pre>
  
  <p>Heres my controller action</p>
  
  <pre><code>class RelationshipsController &lt; ApplicationController
  
  filter_resource_access :nested_in =&gt; :students
  
   def index
     @guardians = @student.guardians  
    end
  </code></pre>
  
  <p>I know I have it set up correctly cause this rule is working fine</p>
  
  <pre><code>has_permission_on :students do 
        to :show
        if_attribute :id =&gt; is {user.student.id}
      end
  </code></pre>
  
  <p>Where is the error in my rule definition?</p>
  
  <p>Please Help</p>