Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-07-23 05:42:19 +0300
committerMark Chao <mchao@gitlab.com>2018-08-14 09:59:29 +0300
commit8411d1cffc05171e82d727d883f03e279c8e9e05 (patch)
treeb09d87417123465509e43306dbba0da3d2abf640 /app/models/notification_setting.rb
parentbea52d827e895c9261b3b1e01980832832f7c82a (diff)
Add email_events to replace EMAIL_EVENTS because it needs to be dynamic,
allowing override for EE.
Diffstat (limited to 'app/models/notification_setting.rb')
-rw-r--r--app/models/notification_setting.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/notification_setting.rb b/app/models/notification_setting.rb
index 1df3a51a7fc..c5d49bd00ca 100644
--- a/app/models/notification_setting.rb
+++ b/app/models/notification_setting.rb
@@ -45,6 +45,14 @@ class NotificationSetting < ActiveRecord::Base
:success_pipeline
].freeze
+ def self.email_events(source = nil)
+ EMAIL_EVENTS
+ end
+
+ def email_events
+ self.class.email_events(source)
+ end
+
EXCLUDED_PARTICIPATING_EVENTS = [
:success_pipeline
].freeze