Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-17 16:39:43 +0300
committerDouwe Maan <douwe@gitlab.com>2015-10-17 16:39:43 +0300
commit9a4fc36706f22f537d8752d18e77966eadb82947 (patch)
tree35ea0b380addf5de083289a29b2ac6d0527c6508
parentea798209aedbee3e19e32a2ae33b55b6a6056de0 (diff)
Remove duplicated scope.
-rw-r--r--app/models/commit_status.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 8188ba3a28e..7d54d83974a 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -15,12 +15,11 @@ class CommitStatus < ActiveRecord::Base
scope :pending, -> { where(status: 'pending') }
scope :success, -> { where(status: 'success') }
scope :failed, -> { where(status: 'failed') }
- scope :running_or_pending, -> { where(status:[:running, :pending]) }
- scope :finished, -> { where(status:[:success, :failed, :canceled]) }
+ 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 :ordered, -> { order(:ref, :stage_idx, :name) }
scope :for_ref, ->(ref) { where(ref: ref) }
- scope :running_or_pending, -> { where(status: [:running, :pending]) }
state_machine :status, initial: :pending do
event :run do