change query for origami

This commit is contained in:
phyusin
2018-02-16 17:47:34 +06:30
parent 8b6dd007ad
commit 032e085b6e
4 changed files with 98 additions and 105 deletions

View File

@@ -9,6 +9,7 @@ class Booking < ApplicationRecord
has_many :booking_orders
has_many :orders, :through => :booking_orders
scope :active, -> {where("booking_status != 'moved'")}
scope :today, -> {where("created_at >= #{Time.now.utc}")}
def self.update_dining_facility(booking_arr, newd, old)
table = DiningFacility.find(newd)