Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
18
app/controllers/crm/bookings_controller.rb
Normal file
18
app/controllers/crm/bookings_controller.rb
Normal 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
|
||||
2
app/helpers/crm/bookings_helper.rb
Normal file
2
app/helpers/crm/bookings_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module Crm::BookingsHelper
|
||||
end
|
||||
Reference in New Issue
Block a user