update add order

This commit is contained in:
Aung Myo
2017-07-26 15:04:35 +06:30
parent c93b50d46a
commit 83b8d72632
6 changed files with 111 additions and 96 deletions

View File

@@ -1,37 +0,0 @@
class Api::Restaurant::MenuController < Api::ApiController
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id
def index
@menus = Menu.all
@current_menu = Menu.current_menu
end
#Description
# This API show current order details
# Input Params - menu_id
def show
@menu = menu_detail(params[:id])
end
private
def menu_detail (menu_id)
if (menu_id)
#Pull this menu
menu = Menu.find_by_id(menu_id)
return menu
else
Menu.current_menu
end
end
def menu_params()
params.permit(:id)
end
end

View File

@@ -1,5 +1,5 @@
class Api::Restaurant::MenuController < Api::ApiController
skip_before_action :authenticate
#Description
# Pull the default menu details and also other available (active) menus
# Input Params - order_id

View File

@@ -10,6 +10,7 @@ class Origami::AddordersController < BaseOrigamiController
def show
@menu = MenuCategory.all
@table_id = params[:id]
end
private