migrate update for context, project, tickler and calendar

This commit is contained in:
Reinier Balt 2010-12-25 16:28:53 +01:00
parent 33f68df154
commit c64e1bcd80
16 changed files with 494 additions and 402 deletions

View file

@ -18,10 +18,11 @@ class Todo < ActiveRecord::Base
named_scope :active, :conditions => { :state => 'active' }
named_scope :not_completed, :conditions => ['NOT (todos.state = ? )', 'completed']
named_scope :completed, :conditions => ["NOT completed_at IS NULL"]
named_scope :completed, :conditions => ["NOT todos.completed_at IS NULL"]
named_scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
named_scope :deferred, :conditions => ["completed_at IS NULL AND NOT show_from IS NULL"]
named_scope :deferred, :conditions => ["todos.completed_at IS NULL AND NOT todos.show_from IS NULL"]
named_scope :blocked, :conditions => ['todos.state = ?', 'pending']
named_scope :deferred_or_blocked, :conditions => ["(todos.completed_at IS NULL AND NOT todos.show_from IS NULL) OR (todos.state = ?)", "pending"]
STARRED_TAG_NAME = "starred"