Merge branch 'crm' of bitbucket.org:code2lab/sxrestaurant

This commit is contained in:
Yan
2017-06-02 14:58:29 +06:30
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

View File

@@ -0,0 +1,2 @@
module Crm::BookingsHelper
end