28 lines
597 B
Ruby
28 lines
597 B
Ruby
class Api::Restaurant::RoomsController < Api::ApiController
|
|
before_action :set_room, only: [:show]
|
|
|
|
def index
|
|
render json: Room.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_room
|
|
@table = Room.find(params[:id])
|
|
end
|
|
end
|