diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-26 14:48:32 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-26 14:48:32 +0200 |
commit | f4e01b597c7cb40797d0b690451322bc79d8dfe0 (patch) | |
tree | 896bc8ec41cdd7e85ad5a6b66244825c9880d052 /app | |
parent | c14bd53d7483b57d47159c52dcb1b3456885f153 (diff) | |
download | gitlab-ce-f4e01b597c7cb40797d0b690451322bc79d8dfe0.tar.gz |
Move enum specific code from a concern to CI stage
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/stage.rb | 2 | ||||
-rw-r--r-- | app/models/concerns/has_status.rb | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb index 78caa70e52e..b1cca06abaa 100644 --- a/app/models/ci/stage.rb +++ b/app/models/ci/stage.rb @@ -5,7 +5,7 @@ module Ci include HasStatus include Gitlab::OptimisticLocking - enumerate_status! + enum status: HasStatus::STATUSES_ENUM belongs_to :project belongs_to :pipeline diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb index 758d71b7f4c..3803e18a96e 100644 --- a/app/models/concerns/has_status.rb +++ b/app/models/concerns/has_status.rb @@ -12,10 +12,6 @@ module HasStatus failed: 4, canceled: 5, skipped: 6, manual: 7 }.freeze class_methods do - def enumerate_status! - enum status: HasStatus::STATUSES_ENUM - end - def status_sql scope_relevant = respond_to?(:exclude_ignored) ? exclude_ignored : all scope_warnings = respond_to?(:failed_but_allowed) ? failed_but_allowed : none |