Module: Organizations::Models::Concerns::HasOrganizations::ClassMethods
- Defined in:
- lib/organizations/models/concerns/has_organizations.rb
Overview
Module containing class methods to be extended onto ActiveRecord::Base
Instance Method Summary collapse
-
#has_organizations(**options) { ... } ⇒ Object
Enable organization support on this model.
Instance Method Details
#has_organizations(**options) { ... } ⇒ Object
Enable organization support on this model
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/organizations/models/concerns/has_organizations.rb', line 47 def has_organizations(**, &block) # Include instance methods include InstanceMethods # Define associations define_organization_associations # Define class_attribute for settings define_organization_settings(, &block) # Setup callbacks for personal org creation setup_personal_org_callback # Preserve owner integrity on user deletion setup_owner_deletion_guard end |