update menu category
This commit is contained in:
@@ -9,7 +9,10 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
end
|
||||
|
||||
def detail
|
||||
@menu = MenuCategory.all.active
|
||||
today = DateTime.now
|
||||
day = Date.today.wday
|
||||
@menus = Menu.all
|
||||
@menu = MenuCategory.active.where("menu_id =#{@menus[0].id}").order('order_by asc')
|
||||
@table_id = params[:id]
|
||||
@table = DiningFacility.find(@table_id)
|
||||
@booking = @table.get_booking
|
||||
@@ -44,6 +47,18 @@ class Origami::AddordersController < ApplicationController#BaseOrigamiController
|
||||
end
|
||||
end
|
||||
|
||||
def get_menu()
|
||||
if (params[:id])
|
||||
puts params[:id]
|
||||
#Pull this menu
|
||||
@menu = Menu.find_by_id(params[:id])
|
||||
@menu_category = MenuCategory.where("menu_id='#{@menu.id}'").order("order_by asc")
|
||||
# puts @menu.menu_items[1].item_attributes.to_json
|
||||
return @menu
|
||||
else
|
||||
Menu.current_menu
|
||||
end
|
||||
end
|
||||
|
||||
def get_menu_sub_category ()
|
||||
id = params[:id]
|
||||
|
||||
Reference in New Issue
Block a user