Files
sx-fc/app/controllers/api/bookings_controller.rb
2017-10-23 11:38:10 +06:30

15 lines
336 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