diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-01 10:10:39 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-01 10:10:39 +0200 |
commit | feec3a45eb517607d96f5553f36e7d35c97520ba (patch) | |
tree | db037849302326f1ecdd2916687fadd00330cdba /app/models/commit_status.rb | |
parent | 95b010fb73832b1bcfba884b9bcfd87d2954e44c (diff) | |
download | gitlab-ce-ci-changes-refactor.tar.gz |
Show pipelinesci-changes-refactor
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 3a059f01d49..88cb7e21d66 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -53,7 +53,7 @@ class CommitStatus < ActiveRecord::Base scope :failed, -> { where(status: 'failed') } scope :running_or_pending, -> { where(status: [:running, :pending]) } scope :finished, -> { where(status: [:success, :failed, :canceled]) } - scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :ref)) } + scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name)) } scope :ordered, -> { order(:ref, :stage_idx, :name) } scope :for_ref, ->(ref) { where(ref: ref) } |