diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 03:09:30 +0300 |
commit | 060c842402c00f830a810702600cbe39dfa6cf62 (patch) | |
tree | 743bd65ac0c1d4d6518ae8cdd4af5718ec7fb890 /app/models/environment.rb | |
parent | 6867eff1f997a881cd3ea64109f7ba2d4b42fde4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/environment.rb')
-rw-r--r-- | app/models/environment.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 23c2296688d..b2391f33aca 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -119,6 +119,10 @@ class Environment < ApplicationRecord find_or_create_by(name: name) end + def self.valid_states + self.state_machine.states.map(&:name) + end + class << self ## # This method returns stop actions (jobs) for multiple environments within one |