mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-02 19:10:16 +01:00
Changed all Date objects to Datetimes and migrated everything appropriately. Tests & specs pass, but this still needs a thorough review.
This commit is contained in:
parent
c85c5fd957
commit
778427405a
11 changed files with 49 additions and 16 deletions
|
|
@ -68,6 +68,8 @@ class Todo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def show_from=(date)
|
||||
# parse Date objects into the proper timezone
|
||||
date = user.at_midnight(date) if (date.is_a? Date)
|
||||
activate! if deferred? && date.blank?
|
||||
defer! if active? && !date.blank? && date > user.date
|
||||
self[:show_from] = date
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue