update inventory and shop and seed

This commit is contained in:
Aung Myo
2018-10-09 16:12:52 +06:30
parent 1816b76028
commit 87502ec0f2
17 changed files with 92 additions and 75 deletions

View File

@@ -20,10 +20,10 @@ class EmployeeImageUploader < CarrierWave::Uploader::Base
end
def filename
if Shop.find(1).shop_code.nil?
if current_shop.shop_code.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
"#{current_shop.shop_code}_#{original_filename}" if original_filename.present?
end
end