hubfeenix.fi/app/policies/member_policy.rb

15 lines
179 B
Ruby

class MemberPolicy < AdminPolicy
def update?
return true if member.admin?
owner?
end
def owner?
member == record.member
end
class Scope < Scope
end
end