Class: TenantKit::Current
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- TenantKit::Current
- Defined in:
- lib/tenant_kit/current.rb
Overview
Request-scoped holder for the current tenant, built on
ActiveSupport::CurrentAttributes so state is automatically reset between
requests (and between jobs) — never a raw thread-local, which would bleed
across requests on a reused thread.
Instance Method Summary collapse
-
#scoping_disabled ⇒ Boolean?
Internal flag toggled by without_tenant to disable scoping.
-
#tenant ⇒ Object?
The current tenant record.
Instance Method Details
#scoping_disabled ⇒ Boolean?
Internal flag toggled by TenantKit.without_tenant to disable scoping.
14 |
# File 'lib/tenant_kit/current.rb', line 14 attribute :scoping_disabled |
#tenant ⇒ Object?
Returns the current tenant record.
10 |
# File 'lib/tenant_kit/current.rb', line 10 attribute :tenant |