1
0
Fork 0
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:
Jason Daly 2012-12-13 18:25:14 -05:00
parent e65159f26b
commit 462362b2d4

View file

@ -7,6 +7,7 @@ module Pundit
end
def scope
return nil if policy.nil?
policy::Scope
rescue NameError
nil