Closed diegobernardes closed 3 years ago
Devise will add a validation for email uniqueness without any knowledge of multitenancy. Pretty sure that's where your issue is coming from. You'll want to disable or modify their validation to be scoped to tenant.
Thanks! Forgot about that. Way too much time away of rails 😅 I did forgot these little things.
I'm having some problems with acts_as_tenant. The gem is working fine, but I can't create two users with the same email on different accounts. The restriction is not in the database because I'm able to insert using SQL.
When I try to execute
rake db:setup
I get this error:ActiveRecord::RecordInvalid: Validation failed: Email has already been taken
. I can't create it from the rails console as well. I'm using Rails 6.1, acts_as_tenant 05.0, and Ruby 2.7.2.