update rome check all fun

This commit is contained in:
Aung Myo
2017-08-03 11:22:23 +06:30
parent 3bbf60b3ef
commit 39a314bc9a
3 changed files with 112 additions and 56 deletions

View File

@@ -35,5 +35,20 @@ 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