Commit 5b7edc74 authored by http://jneen.net/'s avatar http://jneen.net/

use the cached abilities in #delegate!

parent a340829c
......@@ -43,7 +43,7 @@ class BasePolicy
end
def delegate!(new_subject)
@can.merge(BasePolicy.class_for(new_subject).abilities(@user, new_subject))
@can.merge(Ability.allowed(@user, new_subject))
end
def can?(rule)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment