remove auto gen for menu
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class MenuCategory < ApplicationRecord
|
class MenuCategory < ApplicationRecord
|
||||||
before_create :generate_menu_category_code
|
# before_create :generate_menu_category_code
|
||||||
|
|
||||||
belongs_to :menu
|
belongs_to :menu
|
||||||
has_many :children, :class_name => "MenuCategory", foreign_key: "menu_category_id"
|
has_many :children, :class_name => "MenuCategory", foreign_key: "menu_category_id"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class MenuItem < ApplicationRecord
|
class MenuItem < ApplicationRecord
|
||||||
|
|
||||||
before_create :generate_menu_item_code
|
# before_create :generate_menu_item_code
|
||||||
|
|
||||||
belongs_to :menu_category, :optional => true
|
belongs_to :menu_category, :optional => true
|
||||||
has_many :menu_item_instances
|
has_many :menu_item_instances
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
class MenuItemInstance < ApplicationRecord
|
class MenuItemInstance < ApplicationRecord
|
||||||
belongs_to :menu_item
|
belongs_to :menu_item
|
||||||
before_create :generate_menu_item_instance_code
|
# before_create :generate_menu_item_instance_code
|
||||||
|
|
||||||
def self.findParentCategory(item)
|
def self.findParentCategory(item)
|
||||||
if item.menu_category_id
|
if item.menu_category_id
|
||||||
|
|||||||
Reference in New Issue
Block a user