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:
authorYorick Peterse <yorickpeterse@gmail.com>2019-02-26 19:07:32 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-03-04 19:44:56 +0300
commit6c9e26a2a0abcf5a7fdff027688e0c5204afed9e (patch)
tree98550d0dff48e4c53809bc599c43ec033ec49bf5 /lib/api/resource_label_events.rb
parent6402880c70f88f4c37a825d09f19221ad1797e4b (diff)
Move eventable types constant to a helper
This moves API::ResourceLabelEventsHelpers::EVENTABLE_TYPES to a class method in a separate helper module, allowing EE to redefine it without having to directly modify the source code.
Diffstat (limited to 'lib/api/resource_label_events.rb')
-rw-r--r--lib/api/resource_label_events.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/resource_label_events.rb b/lib/api/resource_label_events.rb
index 0c328f7268e..448bef12cec 100644
--- a/lib/api/resource_label_events.rb
+++ b/lib/api/resource_label_events.rb
@@ -7,9 +7,7 @@ module API
before { authenticate! }
- EVENTABLE_TYPES = [Issue, MergeRequest].freeze
-
- EVENTABLE_TYPES.each do |eventable_type|
+ Helpers::ResourceLabelEventsHelpers.eventable_types.each do |eventable_type|
parent_type = eventable_type.parent_class.to_s.underscore
eventables_str = eventable_type.to_s.underscore.pluralize