Files
sx-fc/app/controllers/crm/bookings_controller.rb
2018-02-05 18:11:45 +06:30

24 lines
564 B
Ruby
Executable File

class Crm::BookingsController < BaseCrmController
load_and_authorize_resource
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
#Shop Name in Navbor
helper_method :shop_detail
def shop_detail
@shop = Shop.first
end
end