mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
Remove unnecessary null-specific order
This commit is contained in:
committed by
Alfredo Sumaran
parent
77f30af017
commit
bf193eb78b
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user