update uploader for shop code
This commit is contained in:
@@ -15,7 +15,7 @@ class MenuItemImageUploader < CarrierWave::Uploader::Base
|
|||||||
# Override the directory where uploaded files will be stored.
|
# Override the directory where uploaded files will be stored.
|
||||||
# This is a sensible default for uploaders that are meant to be mounted:
|
# This is a sensible default for uploaders that are meant to be mounted:
|
||||||
def store_dir
|
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}"
|
# "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user