Commit 83bda94f authored by Mehmet Beydogan's avatar Mehmet Beydogan Committed by Robert Speicher

Update due date asc scope for mysql

parent 3afd0817
......@@ -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
......
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