mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Fixing TypeError trying to call ::Scope on nil
This commit is contained in:
parent
e65159f26b
commit
462362b2d4
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ module Pundit
|
|||
end
|
||||
|
||||
def scope
|
||||
return nil if policy.nil?
|
||||
policy::Scope
|
||||
rescue NameError
|
||||
nil
|
||||
|
|
Loading…
Add table
Reference in a new issue