Edit Photo name in commissioner,customers,employee,menu,product and shop

This commit is contained in:
San Wai Lwin
2018-05-10 15:08:57 +06:30
parent 7cc7419b67
commit f52537b509
7 changed files with 24 additions and 7 deletions

View File

@@ -19,6 +19,10 @@ class ProductImageUploader < CarrierWave::Uploader::Base
# "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
def filename
"#{Shop.find(1).shop_code}_#{original_filename}" if original_filename.present?
end
# def cache_dir
# '/tmp/images'
# end