Sort by 'show_from' in tickler

This commit is contained in:
Carsten Otto 2015-04-12 23:22:04 +02:00
parent bf8b118ebf
commit 1ed137afa9
2 changed files with 10 additions and 1 deletions

View file

@ -558,7 +558,7 @@ class TodosController < ApplicationController
includes = params[:format]=='xml' ? [:context, :project] : Todo::DEFAULT_INCLUDES
@not_done_todos = current_user.todos.deferred.includes(includes) + current_user.todos.pending.includes(includes)
@not_done_todos = current_user.todos.deferred.includes(includes).reorder('show_from') + current_user.todos.pending.includes(includes)
@todos_without_project = @not_done_todos.select{|t|t.project.nil?}
@down_count = @count = @not_done_todos.size