mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
parent
1bfe952d09
commit
72fe4923c4
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,8 @@ require "active_support/core_ext/module/introspection"
|
|||
require "active_support/dependencies/autoload"
|
||||
|
||||
module Pundit
|
||||
SUFFIX = "Policy"
|
||||
|
||||
class NotAuthorizedError < StandardError
|
||||
attr_reader :query, :record, :policy
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ module Pundit
|
|||
else
|
||||
object.class
|
||||
end
|
||||
"#{klass}Policy"
|
||||
"#{klass}#{SUFFIX}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue