fix(microsoft-shared): explicitly require MicrosoftSharedDelivery in initializer
Some checks failed
Lock Threads / action (push) Has been cancelled

Initializers run during Rails boot before Zeitwerk finalises autoload, so
referencing MicrosoftSharedDelivery during config raises NameError on
'rake assets:precompile' and other early-boot rake tasks. Mirror the
existing LeadmailDelivery fix (commit 2d54224d0) by requiring the file
explicitly.

Also drop the unused 'config.action_mailer.delivery_methods ||= {}' line —
delivery methods are registered via add_delivery_method, not that hash.
This commit is contained in:
netlas
2026-04-27 12:58:53 +03:00
parent 78cfd07009
commit a310880f67

View File

@@ -1,4 +1,5 @@
require Rails.root.join('app/mailers/microsoft_shared_delivery').to_s
Rails.application.configure do
config.action_mailer.delivery_methods ||= {}
ActionMailer::Base.add_delivery_method :microsoft_shared, MicrosoftSharedDelivery
end