sferik/rails_admin — Issue #1000: CanCan 'can :manage, Model' works only for the first request
Author: versilov
Created: 2012-02-22 19:01:08+00:00
State: open

while 'can :manage, :all' works fine for all subsequent requests.

```ruby

if user.has_role? :admin
can :access, :rails_admin
can :dashboard

can :manage, Store
can :manage, Order
end
```

For the very first request rails_admin gets authorization for models listing with cancan and shows all the necessary models.
For the second and all subsequent requests it suddenly shows absolutely empty dashboard. As far as I debugged it this happens because cancan returns false for can? :index, Store.

This behaviour appeared after one of the last updates of rails_admin.