From cf8a739bb3efacff3cbbcd0c3db8faee2dc47b7a Mon Sep 17 00:00:00 2001 From: Brendon Murphy Date: Sat, 9 Mar 2013 02:58:48 -0800 Subject: [PATCH] Change default index? policy to false See gh-17 for initial discussion. I think that the default provided before this commit is confusing, because an empty result is not a good indicator of authorization failure. Returning false better communicates "override this is you want it". --- lib/generators/pundit/install/templates/application_policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators/pundit/install/templates/application_policy.rb b/lib/generators/pundit/install/templates/application_policy.rb index aebdf10..21f1796 100644 --- a/lib/generators/pundit/install/templates/application_policy.rb +++ b/lib/generators/pundit/install/templates/application_policy.rb @@ -7,7 +7,7 @@ class ApplicationPolicy end def index? - scope.exists? + false end def show?