shop code

This commit is contained in:
Myat Zin Wai Maw
2019-12-10 15:18:48 +06:30
parent c606ca73db
commit 79598c0126
115 changed files with 247 additions and 396 deletions

View File

@@ -11,10 +11,10 @@ module MultiTenancy
def find_shop_by_subdomain_or_frist
if request.subdomain.present?
shop_code = request.subdomain.partition('-').last
shop = Shop.find_by(shop_code: shop_code)
@shop = Shop.find_by(shop_code: shop_code)
else
shop = Shop.first
@shop = Shop.first
end
set_current_tenant(shop)
set_current_tenant(@shop)
end
end