Normalize subject field by stripping whitespace and titleizing

This commit is contained in:
ricky committed 2026-08-10 15:13:04 -04:00
1 parent 8d4d9238dc
commit b4be49816c
1 file changed
+2
+2
View File
@@ -19,6 +19,8 @@ class CustomerAppointment < ActiveRecord::Base
validates :subject, presence: true validates :subject, presence: true
validates :date, presence: true validates :date, presence: true
normalizes :subject, with: ->(subject) { subject.strip.titleize }
STATUSES = %w[ STATUSES = %w[
Scheduled Scheduled
CheckedIn CheckedIn