CanCanCan
The authorization Gem for Ruby on Rails
...Authorizations library that allows you to define the rules to access different objects, and provides helpers to check for those permissions. Rails helpers to simplify the code in Rails Controllers by performing the loading and checking of permissions of models automatically and reduce duplicated code. The current user's permissions can then be checked using the can? and cannot? methods in views and controllers. One of the key features of CanCanCan, compared to other authorization libraries, is the possibility to retrieve all the objects that the user is authorized to access.