diff options
author | http://jneen.net/ <jneen@jneen.net> | 2016-08-18 20:38:25 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2016-08-30 21:39:22 +0300 |
commit | 5b7edc74b65f6855d3744ba600f3972c8cbb5894 (patch) | |
tree | 013f20bf29cd0e875530363ae5f184c8e23d6b6d /app/policies/base_policy.rb | |
parent | a340829c42617b40696408c3097d6476970e8b87 (diff) |
use the cached abilities in #delegate!
Diffstat (limited to 'app/policies/base_policy.rb')
-rw-r--r-- | app/policies/base_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb index 5a5b99c81c8..6d38e2eaa73 100644 --- a/app/policies/base_policy.rb +++ b/app/policies/base_policy.rb @@ -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) |