lib/action_policy/rails/authorizer.rb in action_policy-0.7.2 vs lib/action_policy/rails/authorizer.rb in action_policy-0.7.3

- old
+ new

@@ -7,13 +7,13 @@ EVENT_NAME = "action_policy.authorize" def authorize(policy, rule) event = {policy: policy.class.name, rule: rule.to_s} ActiveSupport::Notifications.instrument(EVENT_NAME, event) do - res = super - event[:cached] = policy.result.cached? - event[:value] = policy.result.value - res + result = super + event[:cached] = result.cached? + event[:value] = result.value + result end end end end end