diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-06-07 01:45:16 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-06-07 01:45:16 +0300 |
commit | a544e46bb083c27bfa2966ea67ddf97b5dc7cb08 (patch) | |
tree | 14ffd0a5844127e7a63786a5e695832cc356ab2c /app/controllers/projects/pipeline_schedules_controller.rb | |
parent | 71f9c43c833531fb6e2231225b74a42dea4ae00c (diff) |
Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers
Diffstat (limited to 'app/controllers/projects/pipeline_schedules_controller.rb')
-rw-r--r-- | app/controllers/projects/pipeline_schedules_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects/pipeline_schedules_controller.rb b/app/controllers/projects/pipeline_schedules_controller.rb index 1616b2cb6b8..2662a146968 100644 --- a/app/controllers/projects/pipeline_schedules_controller.rb +++ b/app/controllers/projects/pipeline_schedules_controller.rb @@ -49,9 +49,11 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController def destroy if schedule.destroy - redirect_to pipeline_schedules_path(@project) + redirect_to pipeline_schedules_path(@project), status: 302 else - redirect_to pipeline_schedules_path(@project), alert: "Failed to remove the pipeline schedule" + redirect_to pipeline_schedules_path(@project), + status: 302, + alert: "Failed to remove the pipeline schedule" end end |