Proc as Rule condition #773

Open
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants

allow to use Proc (or other Objects that respond to call) as a Rule condition, so you can do slow stuff in it, with don't need to be execute each time the Ability Class will be instantiate.

can :manage, Region, :_id.in => ->{ user.region.self_and_child_ids }

xhoy commented Jul 1, 2014

Thanks for your submission! The ryanb/cancan repository has been inactive since Sep 06, 2013.
Since only Ryan himself has commit permissions, the CanCan project is on a standstill.

CanCan has many open issues, including missing support for Rails 4. To keep CanCan alive, an active fork exists at cancancommunity/cancancan. The new gem is cancancan. More info is available at #994.

If your pull request or issue is still applicable, it would be really appreciated if you resubmit it to CanCanCan.

We hope to see you on the other side!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment