Sha256: 3fe0137a1f4467a866575bfe3c62ddc042e317e80cf37920f5debe11215ee713
Contents?: true
Size: 318 Bytes
Versions: 25
Compression:
Stored size: 318 Bytes
Contents
# frozen_string_literal: true # Application Policy class ApplicationPolicy attr_reader :user, :record def keppler_admin? user.keppler_admin? end def same_user?(id) user.id.eql?(id) end def user_can?(objects, method) user.can?(objects.model_name.name.split('::').join(''), method) end end
Version data entries
25 entries across 24 versions & 1 rubygems