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

@@ -22,4 +22,13 @@ class Menu < ApplicationRecord
return current_menu
end
def self.destroyMenu(menu)
cats = MenuCategory.where("menu_id=?",menu.id)
cats.each do |cat|
abc = MenuCategory.destroyCategory(cat)
end
menu.destroy
return false
end
end