hopefully fix time that a todo comes from tickler

assumes the datetime in db is in utc
This commit is contained in:
Reinier Balt 2008-08-25 17:20:27 +02:00
parent 4e12cfafb2
commit 4ac09ed3ae

View file

@ -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,