Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-22 22:53:07 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-23 16:43:29 +0300
commit28097398c5087c3ffc7dc6cd63cd7f8304d3dae9 (patch)
tree46dd2f1a06f1ccae484aacef3cf64d31333d1f1d /app/models/todo.rb
parentf5be56710f0e71042df98f7f7eefbcfed72d912d (diff)
Does not raise an error when Todo is already marked as done
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r--app/models/todo.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 34d71c1b0d3..5f91991f781 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -36,7 +36,7 @@ class Todo < ActiveRecord::Base
state_machine :state, initial: :pending do
event :done do
- transition pending: :done
+ transition [:pending, :done] => :done
end
state :pending