Apply patch from Jeremy Harper to fix a problem with Tickler tasks losing their show_from dates. Fixes #555. Thanks, Jeremy.

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@599 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-09-26 11:50:04 +00:00
parent b334b51ec4
commit 01824384c3

View file

@ -60,7 +60,7 @@ 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 <= ?', Time.now.utc.beginning_of_day ]).collect { |t| t.activate_and_save! }
find(:all, :conditions => ['show_from <= ?', Time.now.beginning_of_day ]).collect { |t| t.activate_and_save! }
end
end
has_many :completed_todos,