summaryrefslogtreecommitdiff
path: root/ee/app/mailers
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-10-04 22:02:30 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-10-04 22:24:01 +0800
commitd594dae4f233bd62b9e7f8f9c65eb491561f1187 (patch)
treecea0da8ba52885821dabc70d5c59307012ab3018 /ee/app/mailers
parent9c389410988b072be2be9bb44ede99499d77f9b7 (diff)
downloadgitlab-ce-d594dae4f233bd62b9e7f8f9c65eb491561f1187.tar.gz
Move include to prepended block to fix emails
Due to some magical interaction between ActiveSupport::Concern and ActionMailer::Base, we'll need to move them into the prepended block, otherwise those email methods cannot be properly promoted as class methods for Notify.
Diffstat (limited to 'ee/app/mailers')
-rw-r--r--ee/app/mailers/ee/notify.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/ee/app/mailers/ee/notify.rb b/ee/app/mailers/ee/notify.rb
index c6bbaa03a9d..7e54a2d3d23 100644
--- a/ee/app/mailers/ee/notify.rb
+++ b/ee/app/mailers/ee/notify.rb
@@ -3,10 +3,15 @@ module EE
extend ActiveSupport::Concern
extend ::Gitlab::Utils::Override
- include ::Emails::AdminNotification
- include ::Emails::CsvExport
- include ::Emails::ServiceDesk
- include ::Emails::Epics
+ # We need to put includes in prepended block due to the magical
+ # interaction between ActiveSupport::Concern and ActionMailer::Base
+ # See https://gitlab.com/gitlab-org/gitlab-ee/issues/7846
+ prepended do
+ include ::Emails::AdminNotification
+ include ::Emails::CsvExport
+ include ::Emails::ServiceDesk
+ include ::Emails::Epics
+ end
attr_reader :group