From 37fb6264dbc95f388231ef4fa289ccc948cc421d Mon Sep 17 00:00:00 2001 From: Pavel Shpak Date: Tue, 10 May 2016 11:33:15 +0300 Subject: [PATCH] clean application_policy template --- .../pundit/install/templates/application_policy.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/generators/pundit/install/templates/application_policy.rb b/lib/generators/pundit/install/templates/application_policy.rb index b91c7f5..1db6f00 100644 --- a/lib/generators/pundit/install/templates/application_policy.rb +++ b/lib/generators/pundit/install/templates/application_policy.rb @@ -11,7 +11,7 @@ class ApplicationPolicy end def show? - scope.where(id: record.id).exists? + false end def create? @@ -34,10 +34,6 @@ class ApplicationPolicy false end - def scope - Pundit.policy_scope!(user, record.class) - end - class Scope attr_reader :user, :scope