Has anyone successfully used the Rails acts_as_tenant
gem for multitenancy, where the tenant ID column is not named xxx_id
?
my model is something like
has_one :tenant, :foreign_key => "tenant_code"
acts_as_tenant :tenant
Then I get my query select * from [table] where tenant_id = xxx
ignoring the overridden foreign_key
spec.
Is there any way to fix this? or am I doing something else obviously wrong?
Thanks!!