mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 06:51:48 +01:00
I think this fixes the migration. Let me know if your done status is converted properly or not.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@328 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
f67e36871c
commit
77bb3f556c
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ class ConvertProjectToStateMachine < ActiveRecord::Migration
|
|||
add_column :projects, :state, :string, :limit => 20, :default => "active", :null => false
|
||||
@projects = Project.find(:all)
|
||||
@projects.each do |project|
|
||||
project.state = project.done ? 'completed' : 'active'
|
||||
project.state = project.done? ? 'completed' : 'active'
|
||||
project.save
|
||||
end
|
||||
remove_column :projects, :done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue