1
0
Fork 0
MSU-Course-Alerter/app/models/ability.rb

12 lines
264 B
Ruby

class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
can :read, Alert, :user_id => user.id
can :create, Alert
can :update, Alert, :user_id => user.id
can :destroy, Alert, :user_id => user.id
end
end