Files
sx-fc/app/controllers/api/restaurant/seatings_controller.rb
2017-04-14 22:47:44 +06:30

29 lines
608 B
Ruby

class Api::Restaurant::SeatingsController < ActionController::API
before_action :set_table, only: [:show]
def index
render json: Table.active.order("order_by")
end
# Description
# This API full the current status of table and if there is order attached to this table - Order_ID will be return
# Output
# status: {available, cleaning, occupied, reserved}, order_id : <current_order_id>
def show
end
def bill
end
def move
end
private
# Use callbacks to share common setup or constraints between actions.
def set_table
@table = Table.find(params[:id])
end
end