mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-01 21:51:49 +01:00
hopefully fix time that a todo comes from tickler
assumes the datetime in db is in utc
This commit is contained in:
parent
4e12cfafb2
commit
4ac09ed3ae
1 changed files with 2 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ class User < ActiveRecord::Base
|
|||
:conditions => [ 'state = ?', 'deferred' ],
|
||||
:order => 'show_from ASC, todos.created_at DESC' do
|
||||
def find_and_activate_ready
|
||||
find(:all, :conditions => ['show_from <= ?', proxy_owner.time ]).collect { |t| t.activate! }
|
||||
# assumes that active record uses :utc to store datetime in db
|
||||
find(:all, :conditions => ['show_from <= ?', Time.now.utc ]).collect { |t| t.activate! }
|
||||
end
|
||||
end
|
||||
has_many :completed_todos,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue