add CarrierWave gems for menu image upload
This commit is contained in:
@@ -15,6 +15,9 @@ class MenuItem < ApplicationRecord
|
||||
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
|
||||
scope :set_menu_item, -> { where(type: 'SetMenuItem') }
|
||||
|
||||
# Item Image Uploader
|
||||
mount_uploader :image_path, MenuItemImageUploader
|
||||
|
||||
def self.collection
|
||||
MenuItem.select("id, name").map { |e| [e.name, e.id] }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user