This commit is contained in:
Dev Team
2025-06-02 17:18:11 +06:30
parent 1a373f0d2a
commit 174a232421
10 changed files with 72 additions and 176 deletions

View File

@@ -13,11 +13,11 @@ module MultiTenancy
end
def find_tenant_by_subdomain_or_name
if request.subdomains.first && request.subdomains.first != "www"
set_current_tenant(Shop.find_by(subdomain: request.subdomains.first))
elsif Shop.count == 1
set_current_tenant(Shop.first)
end
# if request.subdomains.first && request.subdomains.first != "www"
# set_current_tenant(Shop.find_by(subdomain: request.subdomains.first))
# elsif Shop.count == 1
set_current_tenant(Shop.last)
# end
end
def not_found