acts_as_tenant
acts_as_tenant copied to clipboard
ActsAsTenant::Errors::TenantIsImmutable with ActsAsTenant.without_tenant
I'm using ActiveAdmin and trying to allow admin user to change tenant id, like this:
controller do
def update
ActsAsTenant.without_tenant { super }
end
end
But it still throws "ActsAsTenant::Errors::TenantIsImmutable" error, am I doing something wrong?
I'm also having this issue, is there a way to allow changing the tenant_id column inside specific controller actions?
Here's an example of how it can be acomplished: https://github.com/yshmarov/actsastenant-demo/blob/master/app/controllers/tenants_controller.rb#L18
Here's an example of how it can be acomplished: https://github.com/yshmarov/actsastenant-demo/blob/master/app/controllers/tenants_controller.rb#L18
Example is useful, thank you. However it still results in immutable error.