Files
sx-fc/app/controllers/api/bookings_controller.rb
2018-04-09 10:53:16 +06:30

15 lines
338 B
Ruby
Executable File

class Api::BookingsController < Api::ApiController
# skip_before_action :authenticate
#Show customer by ID
def index
@customer = Customer.find_by(params[:id])
end
def show
booking = Booking.find(params[:id])
if booking.dining_facility_id.to_i == params[:table_id].to_i
@booking = booking
end
end
end