I created a multi tenancy app with Apartment gem and rails 5. I successfully create a new tenant, but I want to seed it. When I run the seeds file it states that the seed has run for this new tenant (Seeding tenant_name tenant), but there's no data there, only on public schema.
I can see 2 schemas created on PostgreSQL
db,the public
and the new one, but it only populates public schema. Why?
Tried putting on seeds.rb
:
Apartment::Tenant.switch!('tenant_name')
And:
if Apartment::Tenant.current == "tenant_name"...
But no good.
Anyone?
Thanks in advance!