I'm using ActiveAdmin with CanCan gem and I have the next situation:
- Two roles: admin, other.
- The admin's header with three links: link1 | link2 | link3
- Link 3 represents a Video resource.
- The admin user can see links 1, 2 and 3
- The other user can see link 1 and 2 but NOT 3
So, to make link 3 disappear. I can have an abilities.rb file with:
can :manage, Video #for admin users
and nothing for other users. This will make link 3 disappear. But, in other sections of my app I want other users with ability to "read Videos". When I add this ability, the link appears into the header again.
The question is: How can I preserve my :
can :read, Video #for other users
and disappear link 3 at the same time?