Refactor status retrieval in CustomerAppointment to use constant directly

This commit is contained in:
ricky committed 2026-08-10 19:23:04 -04:00
1 parent 48aa873a02
commit 625b970f29
3 files changed
+2 -6

No files matched your search

-4
View File
@@ -108,10 +108,6 @@ class CustomerAppointment < ActiveRecord::Base
subject subject
end end
def self.statuses
STATUSES
end
private private
def log(msg) def log(msg)
+1 -1
View File
@@ -45,7 +45,7 @@
<%# Calendar Status Legend Key %> <%# Calendar Status Legend Key %>
<% <%
# Collect status keys from CustomerAppointment enum # Collect status keys from CustomerAppointment enum
statuses = CustomerAppointment.statuses statuses = CustomerAppointment::STATUSES
%> %>
<% if statuses.any? %> <% if statuses.any? %>
@@ -38,7 +38,7 @@
<%# Quick Status Action Buttons %> <%# Quick Status Action Buttons %>
<% <%
statuses = CustomerAppointment.statuses statuses = CustomerAppointment::STATUSES
current_status = @appointment.status.to_s.parameterize.underscore current_status = @appointment.status.to_s.parameterize.underscore
%> %>
<div class="appointment-quick-actions"> <div class="appointment-quick-actions">