From 625b970f29a877469d70a30d805c517e00b68a72 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 10 Aug 2026 19:23:04 -0400 Subject: [PATCH] Refactor status retrieval in CustomerAppointment to use constant directly --- app/models/customer_appointment.rb | 4 ---- app/views/common/_calendar.html.erb | 2 +- app/views/customer_appointments/show.html.erb | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/models/customer_appointment.rb b/app/models/customer_appointment.rb index 1c94610..ca69492 100644 --- a/app/models/customer_appointment.rb +++ b/app/models/customer_appointment.rb @@ -108,10 +108,6 @@ class CustomerAppointment < ActiveRecord::Base subject end - def self.statuses - STATUSES - end - private def log(msg) diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb index ab607a6..0a1d7de 100644 --- a/app/views/common/_calendar.html.erb +++ b/app/views/common/_calendar.html.erb @@ -45,7 +45,7 @@ <%# Calendar Status Legend Key %> <% # Collect status keys from CustomerAppointment enum - statuses = CustomerAppointment.statuses + statuses = CustomerAppointment::STATUSES %> <% if statuses.any? %> diff --git a/app/views/customer_appointments/show.html.erb b/app/views/customer_appointments/show.html.erb index 0c26241..5306b2d 100644 --- a/app/views/customer_appointments/show.html.erb +++ b/app/views/customer_appointments/show.html.erb @@ -38,7 +38,7 @@ <%# Quick Status Action Buttons %> <% - statuses = CustomerAppointment.statuses + statuses = CustomerAppointment::STATUSES current_status = @appointment.status.to_s.parameterize.underscore %>