From 8909e553ed6a41aff5707bc4a33af78ac9bf5dab Mon Sep 17 00:00:00 2001 From: benoitqueyron <72251526+Benoit-MINT@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:59:54 +0100 Subject: [PATCH] fix order services --- app/controllers/administrateurs/services_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/administrateurs/services_controller.rb b/app/controllers/administrateurs/services_controller.rb index 7fc329efd..80ad583b1 100644 --- a/app/controllers/administrateurs/services_controller.rb +++ b/app/controllers/administrateurs/services_controller.rb @@ -6,7 +6,7 @@ module Administrateurs skip_before_action :alert_for_missing_service, only: :edit def index @procedure = procedure - @services = services.ordered.sort_by { |service| service == procedure.service ? 0 : 1 } + @services = ([procedure.service].compact + services.ordered).uniq end def new