Remove unnecessary null-specific order

This commit is contained in:
Sean McGivern 2016-06-06 15:41:33 +01:00 committed by Alfredo Sumaran
parent 77f30af017
commit bf193eb78b

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