Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActsAsTenant::Errors::TenantIsImmutable with ActsAsTenant.without_tenant #202

Open
alex91ckua opened this issue Jun 20, 2019 · 6 comments
Open

Comments

@alex91ckua
Copy link

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?

@ksouthworth
Copy link

I'm also having this issue, is there a way to allow changing the tenant_id column inside specific controller actions?

@yshmarov
Copy link
Contributor

yshmarov commented Jun 17, 2020

@pruzicka
Copy link

pruzicka commented Jan 2, 2021

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.

@eddygarcas
Copy link

I can't see any more comments regarding this situation. I'm currently facing the same situation building two separated platforms sharing the same back-end but I would like to switch clients between companies.
Has Anyone found a workaround for this?
Thanks!

@jeantristan
Copy link

It seems that is now handled with: https://github.com/ErwinM/acts_as_tenant#allowing-tenant-updating-for-a-block

@denious
Copy link

denious commented Sep 1, 2023

It seems that is now handled with: https://github.com/ErwinM/acts_as_tenant#allowing-tenant-updating-for-a-block

@excid3 Confirmed that it's fixed in the latest version, I believe this one and related issues can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants