From b4be49816cec429d8dd72d4f8533aff32c8778f0 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 10 Aug 2026 15:13:04 -0400 Subject: [PATCH] Normalize subject field by stripping whitespace and titleizing --- app/models/customer_appointment.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/customer_appointment.rb b/app/models/customer_appointment.rb index d4c9372..ca69492 100644 --- a/app/models/customer_appointment.rb +++ b/app/models/customer_appointment.rb @@ -19,6 +19,8 @@ class CustomerAppointment < ActiveRecord::Base validates :subject, presence: true validates :date, presence: true + normalizes :subject, with: ->(subject) { subject.strip.titleize } + STATUSES = %w[ Scheduled CheckedIn