re-add validate for menu item and cat
This commit is contained in:
@@ -6,7 +6,7 @@ class MenuCategory < ApplicationRecord
|
||||
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
|
||||
has_many :menu_items
|
||||
|
||||
validates_presence_of :name, :menu, :order_by
|
||||
validates_presence_of :name, :menu, :code, :order_by
|
||||
|
||||
default_scope { order('order_by asc') }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ class MenuItem < ApplicationRecord
|
||||
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
|
||||
belongs_to :account
|
||||
|
||||
validates_presence_of :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item
|
||||
validates_presence_of :item_code, :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item
|
||||
|
||||
default_scope { order('item_code asc') }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user