Mercurial > hg > soundsoftware-site
comparison db/migrate/022_serialize_possibles_values.rb @ 1295:622f24f53b42 redmine-2.3
Update to Redmine SVN revision 11972 on 2.3-stable branch
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:02:21 +0100 |
parents | 513646585e45 |
children |
comparison
equal
deleted
inserted
replaced
1294:3e4c3460b6ca | 1295:622f24f53b42 |
---|---|
1 class SerializePossiblesValues < ActiveRecord::Migration | 1 class SerializePossiblesValues < ActiveRecord::Migration |
2 def self.up | 2 def self.up |
3 CustomField.find(:all).each do |field| | 3 CustomField.all.each do |field| |
4 if field.possible_values and field.possible_values.is_a? String | 4 if field.possible_values and field.possible_values.is_a? String |
5 field.possible_values = field.possible_values.split('|') | 5 field.possible_values = field.possible_values.split('|') |
6 field.save | 6 field.save |
7 end | 7 end |
8 end | 8 end |