CRUD Update for Promotion

This commit is contained in:
Phyo
2017-08-30 18:22:22 +06:30
parent 15e37f9ee2
commit bf9f0cdbe7
4 changed files with 119 additions and 8 deletions

View File

@@ -19,6 +19,7 @@ class MenuItem < ApplicationRecord
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
scope :set_menu_item, -> { where(type: 'SetMenuItem') }
scope :active, -> { where(is_available: true) }
# Item Image Uploader
mount_uploader :image_path, MenuItemImageUploader