update room in origami

This commit is contained in:
Aung Myo
2017-08-03 12:05:54 +06:30
parent 39a314bc9a
commit 518314c772
3 changed files with 13 additions and 18 deletions

View File

@@ -35,20 +35,5 @@ class Origami::MoveroomController < BaseOrigamiController
end
end
end
def moving
change_to = params[:change_to] #new
change_from = params[:change_from] #original
bookings = Booking.where('dining_facility_id=?',change_from)
booking_array = Array.new
bookings.each do | booking |
if booking.sale_id.nil? && booking.booking_status != 'moved'
booking_array.push(booking)
end
end
@get_type = Booking.update_dining_facility(booking_array,change_to,change_from)
end
end