mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-31 22:38:49 +01:00
removes getting completed todos when generating home page.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@749 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
2a6ed8f002
commit
631f9fe6ff
2 changed files with 3 additions and 3 deletions
|
|
@ -411,7 +411,7 @@ class TodosController < ApplicationController
|
|||
# current_users.todos.find but that broke with_scope for :limit
|
||||
|
||||
# Exclude hidden projects from count on home page
|
||||
@todos = Todo.find(:all, :conditions => ['todos.user_id = ? and todos.state = ? or todos.state = ?', current_user.id, 'active', 'completed'], :include => [ :project, :context, :tags ])
|
||||
@todos = Todo.find(:all, :conditions => ['todos.user_id = ? and todos.state = ?', current_user.id, 'active'], :include => [ :project, :context, :tags ])
|
||||
|
||||
# Exclude hidden projects from the home page
|
||||
@not_done_todos = Todo.find(: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", :include => [ :project, :context, :tags ])
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ ActiveRecord::Schema.define(:version => 38) do
|
|||
|
||||
create_table "contexts", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "position", :integer, :default => 0
|
||||
t.column "position", :integer
|
||||
t.column "hide", :boolean, :default => false
|
||||
t.column "user_id", :integer, :default => 1
|
||||
t.column "created_at", :datetime
|
||||
|
|
@ -69,7 +69,7 @@ ActiveRecord::Schema.define(:version => 38) do
|
|||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "position", :integer, :default => 0
|
||||
t.column "position", :integer
|
||||
t.column "user_id", :integer, :default => 1
|
||||
t.column "description", :text
|
||||
t.column "state", :string, :limit => 20, :default => "active", :null => false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue