update
This commit is contained in:
@@ -5,7 +5,7 @@ class MenuItem < ApplicationRecord
|
|||||||
belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
|
belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true
|
||||||
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
|
has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id"
|
||||||
|
|
||||||
validates_presence_of :item_code, :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') }
|
default_scope { order('item_code asc') }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user