fix order services

This commit is contained in:
benoitqueyron 2024-11-25 14:59:54 +01:00
parent 26018be459
commit 8909e553ed
No known key found for this signature in database
GPG key ID: AD3C38C9ACA84135

View file

@ -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