Remove unnecessary null-specific order

This commit is contained in:
Sean McGivern
2016-06-06 11:59:49 -05:00
committed by Alfredo Sumaran
parent 77f30af017
commit bf193eb78b
+2 -2
View File
@@ -33,11 +33,11 @@ class Label < ActiveRecord::Base
scope :templates, -> { where(template: true) }
def self.prioritized
where.not(priority: nil).reorder(Gitlab::Database.nulls_last_order(:priority), :title)
where.not(priority: nil).reorder(:title)
end
def self.unprioritized
where(priority: nil).reorder(Gitlab::Database.nulls_last_order(:priority), :title)
where(priority: nil).reorder(:title)
end
alias_attribute :name, :title