diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 11:33:24 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 11:38:43 +0200 |
commit | db9c03bf4426346c631a6cd366a84626ead8d6e3 (patch) | |
tree | 720941b15333030c7654043c96ae81f8e322d3d2 /app/controllers/projects/environments_controller.rb | |
parent | 40528a1326208a04f95f18d6dcc7547cdb8ae0c3 (diff) | |
download | gitlab-ce-db9c03bf4426346c631a6cd366a84626ead8d6e3.tar.gz |
Add environment stop action [ci skip]
Diffstat (limited to 'app/controllers/projects/environments_controller.rb')
-rw-r--r-- | app/controllers/projects/environments_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index 4fe8c3a1889..2ec316a1ebd 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -2,7 +2,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController layout 'project' before_action :authorize_read_environment! before_action :authorize_create_environment!, only: [:new, :create] - before_action :authorize_update_environment!, only: [:edit, :update, :destroy] + before_action :authorize_update_environment!, only: [:edit, :update, :stop, :destroy] before_action :environment, only: [:show, :edit, :update, :destroy] def index @@ -44,6 +44,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController end end + def stop + + end + def destroy if @environment.destroy flash[:notice] = 'Environment was successfully removed.' |