Move interceptors registry into reloader

pull/10420/head
Oliver Günther 2 years ago
parent e5358ea5af
commit 8ec3f05767
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 9
      config/initializers/register_mail_interceptors.rb

@ -28,7 +28,8 @@
# Register interceptors defined in app/mailers/user_mailer.rb # Register interceptors defined in app/mailers/user_mailer.rb
# Do this here, so they aren't registered multiple times due to reloading in development mode. # Do this here, so they aren't registered multiple times due to reloading in development mode.
Rails.application.reloader.to_prepare do
ApplicationMailer.register_interceptor Interceptors::DefaultHeaders ApplicationMailer.register_interceptor Interceptors::DefaultHeaders
# following needs to be the last interceptor # following needs to be the last interceptor
ApplicationMailer.register_interceptor Interceptors::DoNotSendMailsWithoutRecipient ApplicationMailer.register_interceptor Interceptors::DoNotSendMailsWithoutRecipient
end

Loading…
Cancel
Save