diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-18 12:09:32 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-01-18 15:19:35 -0600 |
commit | 0af99433143727088b6a0a1b2163751c05d80ce6 (patch) | |
tree | bf985e09ac95a124169077066c6c0b0e3f6a1be2 /app/controllers | |
parent | 373411d18d019f5321475e4b770cb36f4461a462 (diff) | |
download | gitlab-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.rb | 7 | ||||
-rw-r--r-- | app/controllers/projects/services_controller.rb | 4 |
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 |