diff --git a/app/models/safe_mailer.rb b/app/models/safe_mailer.rb index fbb9f9a8b..b4114e41a 100644 --- a/app/models/safe_mailer.rb +++ b/app/models/safe_mailer.rb @@ -12,7 +12,7 @@ class SafeMailer < ApplicationRecord raise if SafeMailer.count == 1 end - enum forced_delivery_method: Rails.application.config.action_mailer&.balancer_settings&.keys&.map(&:to_s) || [] + enum forced_delivery_method: (Rails.application.config.action_mailer&.balancer_settings&.keys || []).to_h { |k| [k.to_sym, k.to_s] } def self.forced_delivery_method first&.forced_delivery_method diff --git a/config/routes.rb b/config/routes.rb index 1243e43a3..3ae74c592 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -71,7 +71,7 @@ Rails.application.routes.draw do resources :outdated_procedures, only: [:index] do patch :bulk_update, on: :collection end - resources :safe_mailers, only: [:index, :edit, :update, :destroy, :new, :create] + resources :safe_mailers, only: [:index, :edit, :update, :destroy, :new, :create, :show] post 'demandes/create_administrateur' post 'demandes/refuse_administrateur'