mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-01 02:20:16 +01:00
get tests running and fix editing context state
This commit is contained in:
parent
99eed9f638
commit
1e84adc91b
8 changed files with 27 additions and 17 deletions
|
|
@ -34,12 +34,12 @@ class Todo < ActiveRecord::Base
|
|||
scope :not_deferred_or_blocked, :conditions => ["(NOT todos.state=?) AND (NOT todos.state = ?)", "deferred", "pending"]
|
||||
scope :hidden,
|
||||
:joins => "INNER JOIN contexts c_hidden ON c_hidden.id = todos.context_id",
|
||||
:conditions => ["todos.state = ? OR (c_hidden.hide = ? AND (todos.state = ? OR todos.state = ? OR todos.state = ?))",
|
||||
'project_hidden', true, 'active', 'deferred', 'pending']
|
||||
:conditions => ["todos.state = ? OR (c_hidden.state = ? AND (todos.state = ? OR todos.state = ? OR todos.state = ?))",
|
||||
'project_hidden', 'hidden', 'active', 'deferred', 'pending']
|
||||
scope :not_hidden,
|
||||
:joins => "INNER JOIN contexts c_hidden ON c_hidden.id = todos.context_id",
|
||||
:conditions => ['NOT(todos.state = ? OR (c_hidden.hide = ? AND (todos.state = ? OR todos.state = ? OR todos.state = ?)))',
|
||||
'project_hidden', true, 'active', 'deferred', 'pending']
|
||||
:conditions => ['NOT(todos.state = ? OR (c_hidden.state = ? AND (todos.state = ? OR todos.state = ? OR todos.state = ?)))',
|
||||
'project_hidden', 'hidden', 'active', 'deferred', 'pending']
|
||||
|
||||
# other scopes
|
||||
scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue