ref: master
plugins/consumers_coop/lib/ext/organization.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
require_dependency 'organization' class Organization module ConsumerMember def affiliate person, *args self.add_consumer person if self.consumers_coop_settings.enabled super person, *args end def remove_member person self.remove_consumer person if self.consumers_coop_settings.enabled super person end end prepend ConsumerMember end |