class Event
scope :mybooking, ->(user_ids) { where(user_id: user_ids) }
end
Ahora es posible hacer en el controlador:
reservations = [["2","3"], ["3","1"], ["6", "1"]]
Event.mybooking(reservations.map(&:first))
class Event
scope :mybooking, ->(user_ids) { where(user_id: user_ids) }
end
Ahora es posible hacer en el controlador:
reservations = [["2","3"], ["3","1"], ["6", "1"]]
Event.mybooking(reservations.map(&:first))