From d1212d6d27b86be13b238ec52c94308b5610be74 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sun, 12 Jun 2011 00:11:29 +0200 Subject: [PATCH] fix aasm error. Fixes #1089 --- app/models/todo.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/todo.rb b/app/models/todo.rb index 58dcc30a..a6cf3309 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -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