Delete Fix for parent child process in Menu

This commit is contained in:
PhyoTheingi
2017-06-05 18:31:56 +06:30
parent 9bb7eb7f17
commit 7b457400b2
15 changed files with 110 additions and 67 deletions

View File

@@ -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