Module: AgentCode::BelongsToOrganization
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/agentcode/concerns/belongs_to_organization.rb
Overview
Multi-tenant scoping concern. Mirrors the Laravel BelongsToOrganization trait.
Usage: class Post < ApplicationRecord include AgentCode::BelongsToOrganization end
For nested ownership (model doesn't have organization_id directly), the path is auto-detected from belongs_to associations.