Delete Fix for parent child process in Menu
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
class MenuItemInstance < ApplicationRecord
|
||||
belongs_to :menu_item
|
||||
|
||||
def self.findParentCategory(item)
|
||||
if item.menu_category_id
|
||||
return item.menu_category_id
|
||||
else
|
||||
parentitem = MenuItem.find(item.menu_item_id)
|
||||
findParentCategory(parentitem)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user