BigW Consortium Gitlab

Commit 4dfda5f2 by http://jneen.net/

declarative_policy rubocop fix

parent 0487009d
...@@ -28,8 +28,9 @@ module DeclarativePolicy ...@@ -28,8 +28,9 @@ module DeclarativePolicy
subject = find_delegate(subject) subject = find_delegate(subject)
class_for_class(subject.class) \ policy_class = class_for_class(subject.class)
or raise "no policy for #{subject.class.name}" raise "no policy for #{subject.class.name}" if policy_class.nil?
policy_class
end end
def has_policy?(subject) def has_policy?(subject)
......
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