shop code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user