Add option to exclude default tenant in .tenants and with_each_tenant methods #208
lairtonmendes
started this conversation in
Ideas
Replies: 2 comments
-
|
now Im doing some think like this:
The idea would be to have something like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@lairtonmendes Thanks for bringing this up. I originally introduced the "default tenant" in development mode as something that might make it easier to adopt. But in my personal case, I never use it and am doing similar things to "skip" the default tenant. There is a config option you can set to avoid having a default tenant: # config/environments/development.rb
Rails.application.configure do
config.active_record_tenanted.default_tenant = nil
endWould that work for you? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone! 👋
Just wanted to check with you if this idea makes sense, because in my case, it definitely does in the implementation I’m working on.
I’ve been running into some issues when using the
.tenantsmethod (and alsowith_each_tenant) due to the presence of the default tenant, for example "development-tenant". In my use case, this default tenant shouldn’t be included in the list of tenants for most operations.So I’m thinking about implementing a parameter or option to exclude the default tenant from these methods, instead of having to remember to filter it every time after call this methods.
Would love to hear your thoughts on this.
Does this sound like a valid feature to you?
ps: If there’s already an option to avoid creating the default tenant and I just missed it in the code, please forgive me.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions