Use initializer to configure tenant mode

This commit is contained in:
Kevin McConnell
2025-12-10 17:26:53 +00:00
parent a5580666a7
commit 0e443d3602
7 changed files with 38 additions and 8 deletions
+3
View File
@@ -67,4 +67,7 @@ Rails.application.configure do
# Load test helpers
config.autoload_paths += %w[ test/test_helpers ]
# Enable multi-tenant mode for tests
config.x.multi_tenant = true
end
+3
View File
@@ -0,0 +1,3 @@
Rails.application.config.after_initialize do
Account.multi_tenant = ENV["MULTI_TENANT"] == "true" || Rails.configuration.x.multi_tenant == true
end