mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-09 10:48:50 +01:00
Fixed bug where todos got pulled out of tickler too early if user's timezone was behind UTC.
This commit is contained in:
parent
1d64ca0f34
commit
2c3b3d9d69
2 changed files with 16 additions and 2 deletions
|
|
@ -71,8 +71,7 @@ class User < ActiveRecord::Base
|
|||
:conditions => [ 'state = ?', 'deferred' ],
|
||||
:order => 'show_from ASC, todos.created_at DESC' do
|
||||
def find_and_activate_ready
|
||||
# assumes that active record uses :utc to store datetime in db
|
||||
find(:all, :conditions => ['show_from <= ?', Time.now.utc ]).collect { |t| t.activate! }
|
||||
find(:all, :conditions => ['show_from <= ?', proxy_owner.date ]).collect { |t| t.activate! }
|
||||
end
|
||||
end
|
||||
has_many :completed_todos,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue