Remove unnecessary null-specific order
This commit is contained in:
parent
77f30af017
commit
bf193eb78b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue