Acts As Tennant
apartment
Acts As Tennant | apartment | |
---|---|---|
4 | 5 | |
1,506 | 349 | |
- | 0.9% | |
6.4 | 3.7 | |
about 1 month ago | 20 days ago | |
Ruby | Ruby | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Acts As Tennant
- Multitenancy
- Consoliate or forward traffic the comes to different domains that belong to the same server
-
What's the best way to support tenants at a rails app !
It looks like https://github.com/ErwinM/acts_as_tenant
-
multi-tenant-support gem: Help you build a highly secure, multi-tenant rails app without data leak
This gem was inspired by acts_as_tenant, multitenant, multitenancy, rails-multitenant, activerecord-firewall.
apartment
-
Tenant-relative unique record IDs in a multi-tenant app
If you use the Apartment gem with Postgres then you can have a separate schema for each tenant, and tenanted tables naturally use their own separate sequence for ID numbering.
-
How are you dealing with multi tenancy applications?
We have a ~200 table database with 15 tenants, and have used the Apartment gem in its multi-schema configuration on Postgres. Works like a charm! Some people say though that when you get to the hundreds or thousands of tenants, the high number of tables could become an issue.
-
Multitenancy
The currently-maintained version of apartment is the Rails-on-Services one -- ros-apartment.
-
Project structured in different subdomains
For each instance I would then use a multitenant app like https://github.com/rails-on-services/apartment Apartment - this is an actively maintained fork of the original gem.
-
Multitenancy Books ?
Just one thing: the apartment gem, used on the book, stopped to be updated and support only Rails 5.2. But there is an active fork, very well maintained, that supports rails 6.1: https://github.com/rails-on-services/apartment
What are some alternatives?
Apartment - Database multi-tenancy for Rack (and Rails) applications
philia - A Rails6 port of Milia
activerecord-multi-tenant - Rails/ActiveRecord support for distributed multi-tenant databases like Postgres+Citus
Milia - Easy multi-tenanting for Rails5 (or Rails4) + Devise
rails_or - Cleaner syntax for writing OR Query in Rails 5, 6. And also add #or support to Rails 3 and 4.
pluck_all - A more efficient way to get data from database. Like #pluck method but return array of hashes instead.
ActiveRecordExtended - Adds additional postgres functionality to an ActiveRecord / Rails application
Ryakuzu - :heart_eyes_cat: Interface for schema.rb
multi-tenant-support - Build a highly secure, no data leak, multi-tenant rails app
LeftJoins - Backport left_joins method from Rails 5 for Rails 3 and 4
arel-helpers - Useful tools to help construct database queries with ActiveRecord and Arel.
SanitizeSqlLike - Backport #sanitize_sql_like method from Rails 4 for Rails 3. Sanitizes a string so that it is safe to use within an SQL LIKE statement.