← Graph

acts_as_tenant

tool 4 connections

Ruby gem that implements row-level multi-tenancy on top of Active Record. Injects default scopes so queries are automatically scoped to the current tenant and raises an error if no tenant is set on a tenant-scoped model — so in practice using Active Record (not raw SQL) protects you from the 'forgotten WHERE-clause' leak. Highlighted in Q&A as making the WHERE-clause risk much smaller in practice.

category
library
Recommended gem for row-level multi-tenancy; discussed in Q&A about WHERE-clause risk.
about
acts_as_tenant tool
Recommends using acts_as_tenant instead of rolling your own.
about
acts_as_tenant tool
Question is specifically about acts_as_tenant's default behaviour.
tool acts_as_tenant
related_to
Gem implements the row-level partitioning pattern.

Provenance

Read by
15 extractions