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:
Eric Allen 2008-09-13 13:33:48 -07:00
parent c85c5fd957
commit 778427405a
11 changed files with 49 additions and 16 deletions

View file

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