We have implemented a multitenancy app with the Acts As Tenant gem (https://github.com/ErwinM/acts_as_tenant) and Devise, where a User can have Memberships in multiple Organizations. Users eligible for managing other Users (you my call them Admins) can 'invite' Users from other Organizations to join, so that they can switch between those Organizations. No subdomains used.
Essentially a User
has_many Memberships (and Organizations
through Memberships). An Organization
has_many Memberships (and Users
through Memberships). And a Membership
belongs_to an Organization and
I have tried over and over to get Acts_as_tenant to work with devise and opperate correctly but cannot get it to function together. Do you have any suggestions or places to look at a functioning codebase? I have managed to work with Devise quite well and be fine with that, but adding AAT starts causing problems looking for the tenant or account.
Hey Brendan, I have used activerecord-multi-tenant gem (https://github.com/citusdata/activerecord-multi-tenant) that has worked really well and is built on top of acts_as_tenant. It's row based multi-tenancy and works well with Devise too.
as @tabish said, activerecord-multi-tenant gem is super simple to work with and works really well if your looking for a non partitioned approach!
Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.