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:
authorAlexis Reigel <alexis.reigel.ext@siemens.com>2017-12-04 14:51:39 +0300
committerAlexis Reigel <alexis.reigel.ext@siemens.com>2018-01-17 11:55:00 +0300
commita78abf3a0071d1705adc562f23be1f3a347c6db5 (patch)
tree553bac3b43e07507aabe3d833b988015e8749f85 /app/services/system_hooks_service.rb
parentac92d70d9025e1c90bffa99c08bfc4cdb2fc36c9 (diff)
use safer .hooks_for instead of .public_send
with .public_send we can't make sure that the scope on the model actually exists.
Diffstat (limited to 'app/services/system_hooks_service.rb')
-rw-r--r--app/services/system_hooks_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/system_hooks_service.rb b/app/services/system_hooks_service.rb
index 690918b4a00..68c4597a133 100644
--- a/app/services/system_hooks_service.rb
+++ b/app/services/system_hooks_service.rb
@@ -8,7 +8,7 @@ class SystemHooksService
end
def execute_hooks(data, hooks_scope = :all)
- SystemHook.public_send(hooks_scope).find_each do |hook| # rubocop:disable GitlabSecurity/PublicSend
+ SystemHook.hooks_for(hooks_scope).find_each do |hook|
hook.async_execute(data, 'system_hooks')
end
end