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-18 21:09:32 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-19 00:19:35 +0300
commit0af99433143727088b6a0a1b2163751c05d80ce6 (patch)
treebf985e09ac95a124169077066c6c0b0e3f6a1be2 /app/controllers/projects/hooks_controller.rb
parent373411d18d019f5321475e4b770cb36f4461a462 (diff)
Removed the index action from both the projects hook and services controllers
Diffstat (limited to 'app/controllers/projects/hooks_controller.rb')
-rw-r--r--app/controllers/projects/hooks_controller.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index 8c52aa748ae..245c674f650 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -6,10 +6,6 @@ class Projects::HooksController < Projects::ApplicationController
layout "project_settings"
- def index
- redirect_to namespace_project_settings_integrations_path(@project.namespace, @project)
- end
-
def create
@hook = @project.hooks.new(hook_params)
@hook.save
@@ -18,7 +14,8 @@ class Projects::HooksController < Projects::ApplicationController
redirect_to namespace_project_settings_integrations_path(@project.namespace, @project)
else
@hooks = @project.hooks.select(&:persisted?)
- render :index
+ flash[:alert] = @hook.errors.full_messages.join.html_safe
+ redirect_to namespace_project_settings_integrations_path(@project.namespace, @project)
end
end