ErwinM/acts_as_tenant
Easy multi-tenancy for Rails in a shared database setup. observed · 2026-10-13
Health v2 · maintenance only
98/100
- Activity 98
- Release rhythm 98
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 3.0
- age_days: 5552
- days_rel: 13
- days_push: 13
- n_releases_24m: 5
Adoption not part of the score
1708 stars · 269 forks observed · 2026-10-13
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Ruby gem that adds fail-safe row-level multi-tenancy to Ruby on Rails applications using a shared database. It scopes models to a current tenant (e.g., an Account), sets the tenant per request via subdomain or controller, and guards against tenant-scoping bypasses.
Use cases
- add multi-tenancy to a Rails app with a shared database
- scope all ActiveRecord models to the current tenant automatically
- resolve the current tenant from the request subdomain
- validate record uniqueness within a tenant
- prevent users from accessing another tenant's data
When to choose
- you're building a Rails app with a shared database and row-level tenancy
- you want automatic, fail-safe tenant scoping with minimal code changes
- you identify tenants by subdomain or per-request logic
When to avoid
- you need schema-based multitenancy (consider the Apartment gem)
- you're not using Rails or ActiveRecord
- you need database-per-tenant isolation
Facets
library · maturity active
middleware database security web-development backend developer-tools ruby rails multi-tenancy row-level-tenancy shared-database gem activerecord web-server
1 source
- readme: https://github.com/ErwinM/acts_as_tenant · fetched 2026-10-13 · 2ffcb1410a5c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ErwinM/acts_as_tenant | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="ErwinM/acts_as_tenant")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem