fixes query for postgresql for bugreport on mailinglist

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@803 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lrbalt 2008-04-06 15:27:33 +00:00
parent d2d70ac321
commit fc4fc43fee

View file

@ -448,7 +448,7 @@ class TodosController < ApplicationController
@down_count = Todo.count(
:all,
:conditions => ['todos.user_id = ? and todos.state = ? and contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)', current_user.id, 'active', false, 'active'],
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
:group => "todos.id",
:include => [ :project, :context ])
# #@down_count = Todo.count_by_sql(['SELECT COUNT(*) FROM todos,
# contexts WHERE todos.context_id = contexts.id and todos.user_id = ?