diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-06-23 16:46:36 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-06-24 13:23:20 +0300 |
commit | 21fc25fd8efc6fc1196fd26d59f5b5e776240e83 (patch) | |
tree | 11775dbd120dacc706edb7235e50095af693fbb2 /app/models | |
parent | 3825fac65ba2e36620f7d50a8e52fc242ac0d710 (diff) | |
download | gitlab-ci-21fc25fd8efc6fc1196fd26d59f5b5e776240e83.tar.gz |
Ability to cancel all builds in the commit at once
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/build.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/build.rb b/app/models/build.rb index 2ffb80c..6124c8f 100644 --- a/app/models/build.rb +++ b/app/models/build.rb @@ -32,6 +32,7 @@ class Build < ActiveRecord::Base scope :success, ->() { where(status: "success") } scope :failed, ->() { where(status: "failed") } scope :unstarted, ->() { where(runner_id: nil) } + scope :running_or_pending, ->() { where(status:[:running, :pending]) } acts_as_taggable |