missing bookings controller adding

This commit is contained in:
Aung Myo
2017-06-02 14:52:14 +06:30
parent 4e36cad341
commit 92a82f6e7f
4 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
class Crm::BookingsController < ApplicationController
def update_booking
booking = Booking.find(params[:booking_id])
status = booking.update_attributes(booking_status: params[:type])
if status == true
render json: JSON.generate({:status => true ,:type => params[:type]})
else
render json: JSON.generate({:status => false, :error_message => "Record not found"})
end
end
end