summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-07-03 10:17:07 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-07-04 09:35:25 +0100
commit99dea5fa13286346f8c7066d803eb04f4e989663 (patch)
tree53f87b3caca11b825dee9de433815f2fd69174b0 /app/controllers
parent55e2df6c804202a39d0165289988062a693087aa (diff)
downloadgitlab-ce-99dea5fa13286346f8c7066d803eb04f4e989663.tar.gz
Makes production environment the default environment for a project
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/environments_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb
index 1a586105a6d..27b7425b965 100644
--- a/app/controllers/projects/environments_controller.rb
+++ b/app/controllers/projects/environments_controller.rb
@@ -121,7 +121,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
end
def metrics_redirect
- environment = project.environments.with_state(:available).first
+ environment = project.default_environment
if environment
redirect_to environment_metrics_path(environment)