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:
Diffstat (limited to 'app/models/concerns/notification_branch_selection.rb')
-rw-r--r--app/models/concerns/notification_branch_selection.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/app/models/concerns/notification_branch_selection.rb b/app/models/concerns/notification_branch_selection.rb
index 18ec996c3df..f2df7579a65 100644
--- a/app/models/concerns/notification_branch_selection.rb
+++ b/app/models/concerns/notification_branch_selection.rb
@@ -6,13 +6,15 @@
module NotificationBranchSelection
extend ActiveSupport::Concern
- def branch_choices
- [
- [_('All branches'), 'all'].freeze,
- [_('Default branch'), 'default'].freeze,
- [_('Protected branches'), 'protected'].freeze,
- [_('Default branch and protected branches'), 'default_and_protected'].freeze
- ].freeze
+ class_methods do
+ def branch_choices
+ [
+ [_('All branches'), 'all'].freeze,
+ [_('Default branch'), 'default'].freeze,
+ [_('Protected branches'), 'protected'].freeze,
+ [_('Default branch and protected branches'), 'default_and_protected'].freeze
+ ].freeze
+ end
end
def notify_for_branch?(data)