You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
CanCan 1.5 adds support for Mongoid. All you have to do is mention mongoid before cancan in your Gemfile so it is required first.
gem"mongoid"gem"cancan"
That is it, you can now call accessible_by on any Mongoid document (which is done automatically in the index action). You can also use the query syntax that Mongoid provides when defining the abilities.
# in Abilitycan:read,Article,:priority.lt=>5
This is all done through a Model Adapter. See that page for more information and how you can add your own.