Sha256: c1839a6e368de6de2732939bdd344b5ee1be94f0fd7ac88fa1dcbf206dc58c39
Contents?: true
Size: 471 Bytes
Versions: 19
Compression:
Stored size: 471 Bytes
Contents
class ApplicationPolicy attr_reader :user, :record def initialize(user, record) @user = user @record = record end def index? true end def show? scope.where(id: record.id).exists? end def new? create? end def create? true end def edit? update? end def update? true end def destroy? true end def destroy_all? true end def scope Pundit.policy_scope!(user, record.class) end end
Version data entries
19 entries across 19 versions & 4 rubygems