Class: Para::Ability

Inherits:
Object
  • Object
show all
Includes:
CanCan::Ability
Defined in:
app/models/para/ability.rb

Instance Method Summary collapse

Constructor Details

#initialize(user) ⇒ Ability

Returns a new instance of Ability.



5
6
7
8
9
10
# File 'app/models/para/ability.rb', line 5

def initialize(user)
  if user.is_a?(AdminUser)
    can :access, :admin
    can :manage, :all
  end
end