summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-01-18 12:09:32 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-01-18 15:19:35 -0600
commit0af99433143727088b6a0a1b2163751c05d80ce6 (patch)
treebf985e09ac95a124169077066c6c0b0e3f6a1be2 /app/controllers
parent373411d18d019f5321475e4b770cb36f4461a462 (diff)
downloadgitlab-ce-0af99433143727088b6a0a1b2163751c05d80ce6.tar.gz
Removed the index action from both the projects hook and services controllers
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/hooks_controller.rb7
-rw-r--r--app/controllers/projects/services_controller.rb4
2 files changed, 2 insertions, 9 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
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index b4c40c6bf14..17cb1d5be24 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -9,10 +9,6 @@ class Projects::ServicesController < Projects::ApplicationController
layout "project_settings"
- def index
- redirect_to namespace_project_settings_integrations_path(@project.namespace, @project)
- end
-
def edit
end