0

I have setup the Apartment gem, and have a user table in each tenant, but if I tries to create a user with the same email in two different tenants, I get "User exists" when I tries to create the user in the second tenant.

No user data is saved to the public scheme.

What have I overlooked?

Mads E
  • 163
  • 2
  • 12
  • that's cause devise validation of email, have you try with `user` has many tenants ?, you just need add new tenant with email's user and you don't new create new user with same email. – rails_id Jul 11 '15 at 07:02
  • But how would I get all users in tenant? The app should be like: Account (tenant) has many Users. But in some cases a User can be in more than one account. I'm looking at using a table to log which account a user is connected to and putting it in the persistent_schemas array. Is this the way? I'm new to multi-tenancy btw ;) – Mads E Jul 11 '15 at 07:44

0 Answers0