summaryrefslogtreecommitdiff
path: root/app/models/service.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2016-12-27 12:44:24 +0000
committerTiago Botelho <tiagonbotelho@hotmail.com>2017-01-22 00:02:29 +0000
commitcd51af1a991eaa5e16e3c6b94c89d90e20a5641f (patch)
tree487d4facff51567ab73121aed9f3fec29d7aad8f /app/models/service.rb
parent4b7ec44b91e0571d209c790d54947ba1756dac0e (diff)
downloadgitlab-ce-cd51af1a991eaa5e16e3c6b94c89d90e20a5641f.tar.gz
adds events to services api deserialization
Diffstat (limited to 'app/models/service.rb')
-rw-r--r--app/models/service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/service.rb b/app/models/service.rb
index 19ef3ba9c23..df8d9a85041 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -76,6 +76,7 @@ class Service < ActiveRecord::Base
def to_param
# implement inside child
+ self.class.to_param
end
def fields
@@ -92,7 +93,8 @@ class Service < ActiveRecord::Base
end
def event_names
- supported_events.map { |event| "#{event}_events" }
+ # implement inside child
+ self.class.event_names
end
def event_field(event)
@@ -104,7 +106,7 @@ class Service < ActiveRecord::Base
end
def supported_events
- %w(push tag_push issue confidential_issue merge_request wiki_page)
+ self.class.supported_events
end
def execute(data)