diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-02 00:49:57 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-07 13:29:02 +0200 |
commit | 05ef835e23f99fd4c141c259d12d42626d9a33a4 (patch) | |
tree | 304e1e98ce118e94ea6d01ee3e7132d3a9e97b02 /app/models/commit_status.rb | |
parent | 2d5de1a6751481b1299d1f0ff2b13fe5da048bc9 (diff) | |
download | gitlab-ce-05ef835e23f99fd4c141c259d12d42626d9a33a4.tar.gz |
WIP
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 88cb7e21d66..5d5939538c0 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -45,6 +45,11 @@ class CommitStatus < ActiveRecord::Base validates_presence_of :name + def self.stages + group(:stage, :stage_idx).order(:stage_idx) + .pluck(:stage, :stage_idx).map(&:first) + end + alias_attribute :author, :user scope :running, -> { where(status: 'running') } |