class Pundit::PolicyFinder

def scope!

Raises:
  • (NotDefinedError) - if scope could not be determined

Returns:
  • (Scope{#resolve}) - scope class which can resolve to a scope
def scope!
  scope or raise NotDefinedError, "unable to find scope `#{find(object)}::Scope` for `#{object.inspect}`"
end