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

13 lines
264 B
Ruby
Raw Normal View History

2013-04-06 13:03:23 -04:00
class Ability
include CanCan::Ability
def initialize(user)
2013-04-07 06:08:05 -04:00
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
2013-04-06 13:03:23 -04:00
end
end