correctif(safe_mailer): fix bug sur de la synthax

This commit is contained in:
Martin 2023-01-11 20:24:57 +01:00
parent 72e31d4d90
commit 822eda7c42
2 changed files with 2 additions and 2 deletions

View file

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

View file

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