#300: Displays show_from correctly

This commit is contained in:
Henrik Bohre 2009-06-09 00:13:56 +02:00 committed by Eric Allen
parent 3d3b703dfd
commit 06e4bd4412

View file

@ -42,7 +42,7 @@ class Todo < ActiveRecord::Base
event :activate do
transitions :to => :active, :from => [:project_hidden, :completed, :deferred]
transitions :to => :active, :from => [:pending],
:guard => Proc.new{|t| t.show_from.blank? or t.show_from > Time.zone.now}
:guard => Proc.new{|t| t.show_from.blank? or Time.zone.now > t.show_from}
transitions :to => :deferred, :from => [:pending]
end