Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-07-03 12:17:07 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-07-04 11:35:25 +0300
commit99dea5fa13286346f8c7066d803eb04f4e989663 (patch)
tree53f87b3caca11b825dee9de433815f2fd69174b0 /app/controllers/projects
parent55e2df6c804202a39d0165289988062a693087aa (diff)
Makes production environment the default environment for a project
Diffstat (limited to 'app/controllers/projects')
-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)