Module: TenantKit::Model

Extended by:
ActiveSupport::Concern
Defined in:
lib/tenant_kit/model.rb

Overview

Mixed into every ActiveRecord::Base (via the railtie). Provides the belongs_to_tenant macro that turns a plain model into a tenant-owned one: it declares the tenant association, scopes all queries to the current tenant, auto-assigns the tenant on create, and validates the tenant's presence.

Defined Under Namespace

Modules: BuildGuard