Update due date asc scope for mysql

This commit is contained in:
Mehmet Beydogan 2016-03-12 10:11:07 +02:00 committed by Robert Speicher
parent 3afd08170d
commit 83bda94ffc

View file

@ -18,7 +18,7 @@ module Sortable
scope :order_updated_asc, -> { reorder(updated_at: :asc) }
scope :order_name_asc, -> { reorder(name: :asc) }
scope :order_name_desc, -> { reorder(name: :desc) }
scope :due_date_asc, -> { reorder(due_date: :asc) }
scope :due_date_asc, -> { reorder("due_date IS NULL, due_date ASC") }
scope :due_date_desc, -> { reorder("due_date IS NULL, due_date DESC") }
end