Changing the default sort order so that the context view matches the home screen view.

This appears to override the todos_controller.rb order.
This commit is contained in:
Craig Maloney 2011-10-12 23:22:44 -03:00
parent 671652c4c4
commit 09e0f64de7

View file

@ -1,6 +1,7 @@
class Context < ActiveRecord::Base
has_many :todos, :dependent => :delete_all, :include => :project, :order => "todos.completed_at DESC"
has_many :todos, :dependent => :delete_all, :include => :project,
:order => 'todos.due IS NULL, todos.due ASC, todos.created_at ASC'
has_many :recurring_todos, :dependent => :delete_all
belongs_to :user