diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-18 15:40:16 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-18 15:40:16 -0600 |
commit | 7b3ea49a4449686e512a5236c2d4073641afce77 (patch) | |
tree | 8cca1dc798bfd05efd2fc9706c91908aac89f27b /app | |
parent | 0af99433143727088b6a0a1b2163751c05d80ce6 (diff) | |
download | gitlab-ce-7b3ea49a4449686e512a5236c2d4073641afce77.tar.gz |
Fixed tests and a rubocop linter26138-combine-webhooks-and-services-settings-pages
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/hooks_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb index 245c674f650..b668a9331e7 100644 --- a/app/controllers/projects/hooks_controller.rb +++ b/app/controllers/projects/hooks_controller.rb @@ -10,13 +10,11 @@ class Projects::HooksController < Projects::ApplicationController @hook = @project.hooks.new(hook_params) @hook.save - if @hook.valid? - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) - else + unless @hook.valid? @hooks = @project.hooks.select(&:persisted?) flash[:alert] = @hook.errors.full_messages.join.html_safe - redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end + redirect_to namespace_project_settings_integrations_path(@project.namespace, @project) end def test |