This commit is contained in:
Myat Zin Wai Maw
2020-01-14 18:09:45 +06:30
parent 60af9124bb
commit d6e0079314
6 changed files with 188 additions and 131 deletions

View File

@@ -20,7 +20,7 @@ class CustomerImageUploader < CarrierWave::Uploader::Base
end
def filename
if Shop.current_shop.shop_code.nil?
if Shop.current_shop.nil?
"#{original_filename}" if original_filename.present?
else
"#{Shop.current_shop.shop_code}_#{original_filename}" if original_filename.present?