diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-06-29 10:02:32 +0200 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-06-29 10:02:32 +0200 |
commit | c9a7145a100d24c6dbed98d11b0bc3af7a97cdb7 (patch) | |
tree | d46c9027853f2b4e1cc8c40f02c80735f03ac9f0 /app/controllers/projects/environments_controller.rb | |
parent | dd467d6c758b485938553f312ee276fd54e63384 (diff) | |
download | gitlab-ce-c9a7145a100d24c6dbed98d11b0bc3af7a97cdb7.tar.gz |
Remove GET empty from EnvironmentsController
Diffstat (limited to 'app/controllers/projects/environments_controller.rb')
-rw-r--r-- | app/controllers/projects/environments_controller.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index 53da384dc74..1a586105a6d 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -120,21 +120,14 @@ class Projects::EnvironmentsController < Projects::ApplicationController end end - def empty - render :empty - end - def metrics_redirect environment = project.environments.with_state(:available).first - path = - if environment - environment_metrics_path(environment) - else - empty_project_environments_path(project) - end - - redirect_to path + if environment + redirect_to environment_metrics_path(environment) + else + render :empty + end end def metrics |