diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-06-21 12:05:25 +0300 |
---|---|---|
committer | Jose <jvargas@gitlab.com> | 2018-06-27 07:06:25 +0300 |
commit | 55943872f43798b58009c4248d993cc8cb8d34cc (patch) | |
tree | 626c2e14592a7dcb8853e0a8ad5debdfdf374d5d /app/controllers/projects/application_controller.rb | |
parent | 3c49bcb602a38364d0034bfe927097bedbca986c (diff) |
Adds empty environments page
Diffstat (limited to 'app/controllers/projects/application_controller.rb')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index 719a3c37f45..5475e333db9 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -5,7 +5,7 @@ class Projects::ApplicationController < ApplicationController skip_before_action :authenticate_user! before_action :project before_action :repository - before_action :environment + before_action :available_environment layout 'project' helper_method :repository, :can_collaborate_with_project?, :user_access @@ -33,8 +33,8 @@ class Projects::ApplicationController < ApplicationController @repository ||= project.repository end - def environment - @environment ||= project.environments.first + def available_environment + @available_environment ||= project.environments.with_state(:available).first end def authorize_action!(action) |