update uploader for shop code

This commit is contained in:
Aung Myo
2018-10-11 11:41:07 +06:30
parent 79641598df
commit 549a655bad

View File

@@ -15,7 +15,7 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
def store_dir
"image/menu_images/#{current_shop.shop_code}"
"image/menu_images/#{Shop.first.shop_code}"
# "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end