tab/app/models/ability.rb
2015-09-09 16:56:55 +02:00

11 lines
213 B
Ruby

class Ability
include CanCan::Ability
def initialize(user)
return unless user
can :manage, :all if user.penning?
can :read, user, id: user.id
can :create, Transaction, debtor: user
end
end