demarches-normaliennes/config/initializers/mail_observers.rb
Nicolas Cavigneaux 00e640a21d
fix Zeitwerk check
2023-05-03 10:10:38 +02:00

8 lines
273 B
Ruby

# Must be registered *before* loading custom delivery methods
# otherwise the observer won't be invoked.
#
require_relative "../../app/services/email_delivery_observer"
ActiveSupport.on_load(:action_mailer) do |mailer|
mailer.register_observer EmailDeliveryObserver
end