Commit bf193eb7 authored by Sean McGivern's avatar Sean McGivern Committed by Alfredo Sumaran

Remove unnecessary null-specific order

parent 77f30af0
...@@ -33,11 +33,11 @@ class Label < ActiveRecord::Base ...@@ -33,11 +33,11 @@ class Label < ActiveRecord::Base
scope :templates, -> { where(template: true) } scope :templates, -> { where(template: true) }
def self.prioritized def self.prioritized
where.not(priority: nil).reorder(Gitlab::Database.nulls_last_order(:priority), :title) where.not(priority: nil).reorder(:title)
end end
def self.unprioritized def self.unprioritized
where(priority: nil).reorder(Gitlab::Database.nulls_last_order(:priority), :title) where(priority: nil).reorder(:title)
end end
alias_attribute :name, :title alias_attribute :name, :title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment