Sha256: 2e5b32d368872f9b4f8594f6fac4288eac7476aab97bba3b5e3261024f4eabba
Contents?: true
Size: 272 Bytes
Versions: 8
Compression:
Stored size: 272 Bytes
Contents
module EnjuNii class Ability include CanCan::Ability def initialize(user, ip_address = nil) case user.try(:role).try(:name) when 'Administrator' can [:read, :update], NiiType else can :read, NiiType end end end end
Version data entries
8 entries across 8 versions & 1 rubygems