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:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-01-19 00:40:16 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-19 00:40:16 +0300
commit7b3ea49a4449686e512a5236c2d4073641afce77 (patch)
tree8cca1dc798bfd05efd2fc9706c91908aac89f27b /app/controllers/projects/hooks_controller.rb
parent0af99433143727088b6a0a1b2163751c05d80ce6 (diff)
Fixed tests and a rubocop linter
Diffstat (limited to 'app/controllers/projects/hooks_controller.rb')
-rw-r--r--app/controllers/projects/hooks_controller.rb6
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