Core concepts of ActiveRecord::Tenanted
mainActiveRecord::Tenanted enables a Rails application to host multiple isolated tenants. It is designed so that developing a multi-tenant app feels as easy as developing a single-tenant app; your application code should not need to be aware of the tenant isolation logic.
The gem follows these guiding principles:
- Data at rest: Persisted in separate stores for each tenant, isolated physically or logically.
- Data in transit: Only sent to users with authenticated access to the specific tenant instance.
- Isolated execution: All tenant-related code execution happens within a well-defined isolated tenant context with controls around data access.
IMPORTANT Currently, only the
sqlite3database adapter is fully supported. If you need to tenant other database types supported by Rails, contact the maintainers.