Skip to content

Commit

Permalink
Merge pull request #304 from beanieboi/controller-class
Browse files Browse the repository at this point in the history
add controller class to exception
  • Loading branch information
jnicklas committed Jan 14, 2016
2 parents c7251d4 + eb903a8 commit 6b0109a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pundit.rb
Expand Up @@ -102,11 +102,11 @@ def pundit_policy_scoped?
end

def verify_authorized
raise AuthorizationNotPerformedError unless pundit_policy_authorized?
raise AuthorizationNotPerformedError.new(self.class) unless pundit_policy_authorized?
end

def verify_policy_scoped
raise PolicyScopingNotPerformedError unless pundit_policy_scoped?
raise PolicyScopingNotPerformedError.new(self.class) unless pundit_policy_scoped?
end

def authorize(record, query=nil)
Expand Down

0 comments on commit 6b0109a

Please sign in to comment.