summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-06-07 11:57:09 +0100
committerSean McGivern <sean@gitlab.com>2016-06-07 14:01:30 +0100
commitee26c3cab4651c8876efc45b6a63539727e6a42e (patch)
treeda7df699ab6f78c39a562abe2307568f7c8dd7eb /app/models/label.rb
parenta04897b76b00e4a099faf55e30443378928e28e1 (diff)
downloadgitlab-ce-ee26c3cab4651c8876efc45b6a63539727e6a42e.tar.gz
Fix label order by priority on labels pageissue_14189
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 9760f1aefa9..49c352cc239 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -33,11 +33,11 @@ class Label < ActiveRecord::Base
scope :templates, -> { where(template: true) }
def self.prioritized
- where.not(priority: nil).reorder(:title)
+ where.not(priority: nil).reorder(:priority, :title)
end
def self.unprioritized
- where(priority: nil).reorder(:title)
+ where(priority: nil)
end
alias_attribute :name, :title