fix aasm error. Fixes #1089

This commit is contained in:
Reinier Balt 2011-06-12 00:11:29 +02:00
parent 626edb478d
commit d1212d6d27

View file

@ -52,8 +52,8 @@ class Todo < ActiveRecord::Base
# when entering active state, also remove completed_at date. Looks like :exit
# of state completed is not run, see #679
aasm_state :active
aasm_state :project_hidden, :enter => Proc.new { |t| t.completed_at = Time.zone.now }, :exit => Proc.new { |t| t.completed_at = nil }
aasm_state :completed, :exit => Proc.new { |t| t.completed_at = nil }
aasm_state :project_hidden
aasm_state :completed, :enter => Proc.new { |t| t.completed_at = Time.zone.now }, :exit => Proc.new { |t| t.completed_at = nil }
aasm_state :deferred, :exit => Proc.new { |t| t[:show_from] = nil }
aasm_state :pending