Sha256: 29d160b76f5d56b54300fe58a22e8dfa4c5eba5db0336f1e5a62578fc95d9bc3
Contents?: true
Size: 770 Bytes
Versions: 11
Compression:
Stored size: 770 Bytes
Contents
class OrganizationAbility include CanCan::Ability def initialize(organization) organization.kits.each do |kit| kit.abilities.arity < 1 ? instance_eval(&kit.abilities) : kit.abilities.call(self) end can :manage, Event, :organization_id => organization.id can :manage, Show, :organization_id => organization.id can :manage, Chart, :organization_id => organization.id can :manage, Ticket, :organization_id => organization.id can :manage, Person, :organization_id => organization.id can :manage, Segment, :organization_id => organization.id can :manage, Order, :organization_id => organization.id can :manage, Household, :organization_id => organization.id can :manage, Organization, :id => organization.id end end
Version data entries
11 entries across 11 versions & 1 rubygems