title: CanCan authorization issue index action
body: <p>I am having an issue trying to use the cancan authorization. I have users with one role per user, so I added user.role column as suggested in <a href="https://github.com/ryanb/cancan/wiki/Role-Based-Authorization" rel="nofollow noreferrer" title="here">the cancan wiki</a>.</p>
  
  <p>I also have an index view for kindergardens and another index view for children.</p>
  
  <p>What I am trying to achieve is to only allow access to the index views to the corresponding users with role kindergarden or parent (for children).</p>
  
  <p>When I now authorize Kindergardens in kindergardens controller nobody is allowed to access the index view, although I defined it in my ability model.</p>
  
  <p>Help would be much appreciated. I have no idea what I am missing...</p>
  
  <p>Ability model:</p>
  
  <pre><code>class Ability
  include CanCan::Ability
  
  def initialize(user)
  [...]
  elsif user.role == 'kindergarden'
     can [:update, :destroy], Kiga do |kiga|
       kiga.user_id == user.id
     end
     can :read, Kiga do |kiga|
       kiga.user_id == user.id
     end
     can :index, Kiga
  
     can :create, Kiga
  else
  
  end
  </code></pre>
  
  <p>Kindergardens controller:</p>
  
  <pre><code>class KigasController &lt; ApplicationController
  before_action :set_kiga, only: [:show, :edit, :update, :destroy]
  
  # GET /kigas
  # GET /kigas.json
  def index
    @kigas = Kiga.all
    authorize! :index, @kiga
  end
  </code></pre>