mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-02 19:10:16 +01:00
further refactoring of stats controller and views
This commit is contained in:
parent
b948cc48b2
commit
78a2bd7f49
9 changed files with 258 additions and 147 deletions
|
|
@ -26,7 +26,7 @@ class Todo < ActiveRecord::Base
|
|||
named_scope :blocked, :conditions => ['todos.state = ?', 'pending']
|
||||
named_scope :pending, :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"]
|
||||
named_scope :not_deferred_or_blocked, :conditions => ["todos.completed_at IS NULL AND todos.show_from IS NULL AND NOT(todos.state = ?)", "pending"]
|
||||
named_scope :not_deferred_or_blocked, :conditions => ["(todos.completed_at IS NULL) AND (todos.show_from IS NULL) AND (NOT todos.state = ?)", "pending"]
|
||||
named_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 = ?))",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue