From f3583528ea5fd7af13a673be8624399d4d06f3b9 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 8 Aug 2026 11:10:49 -0400 Subject: [PATCH] only show furture appointments --- app/controllers/customer_appointments_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/customer_appointments_controller.rb b/app/controllers/customer_appointments_controller.rb index fe31c79..0dc5939 100644 --- a/app/controllers/customer_appointments_controller.rb +++ b/app/controllers/customer_appointments_controller.rb @@ -28,9 +28,9 @@ class CustomerAppointmentsController < ApplicationController def index if params[:project_id] @project = Project.find(params[:project_id]) - @appointments = CustomerAppointment.where(project: @project).order(:start_date) + @appointments = CustomerAppointment.where(project: @project).where('date >= ?', Time.zone.now.beginning_of_day).order(:date) else - @appointments = CustomerAppointment.order(:start_date) + @appointments = CustomerAppointment.where('date >= ?', Time.zone.now.beginning_of_day).order(:date) end end