diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-02-06 16:50:03 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-02-06 16:50:03 +0100 |
commit | 1664354c65c103bd3ad55ebe32e84635bef22a6d (patch) | |
tree | ecbb6ceeb7e6c80f70d76950036c638c60522a05 /app/models/environment.rb | |
parent | a8825f0c7fb5da6a047813a491e6b8aebc33bb5b (diff) | |
download | gitlab-ce-1664354c65c103bd3ad55ebe32e84635bef22a6d.tar.gz |
Update changes
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 066f57292b8..13c4630c565 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -110,15 +110,15 @@ class Environment < ActiveRecord::Base external_url.gsub(/\A.*?:\/\//, '') end - def can_run_stop_action? + def stop_action? available? && stop_action.present? end - def run_stop!(current_user) + def stop_with_action!(current_user) return unless available? - stop - stop_action.play(current_user) + stop! + stop_action.play(current_user) if stop_action end def actions_for(environment) |