summaryrefslogtreecommitdiff
path: root/app/models/environment.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-02-06 16:50:03 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-02-06 16:50:03 +0100
commit1664354c65c103bd3ad55ebe32e84635bef22a6d (patch)
treeecbb6ceeb7e6c80f70d76950036c638c60522a05 /app/models/environment.rb
parenta8825f0c7fb5da6a047813a491e6b8aebc33bb5b (diff)
downloadgitlab-ce-1664354c65c103bd3ad55ebe32e84635bef22a6d.tar.gz
Update changes
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r--app/models/environment.rb8
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)