Merge pull request #41 from craigmaloney/patch-1

Changing the default sort order so that the context view matches the home
This commit is contained in:
Reinier Balt 2011-10-15 04:39:50 -07:00
commit 6b401e5f41

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