To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 66 / 66e6d91872e5c58f97ccd121d804011ad75f7898.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (319 Bytes)
| 1 |
class SerializePossiblesValues < ActiveRecord::Migration |
|---|---|
| 2 |
def self.up |
| 3 |
CustomField.find(:all).each do |field| |
| 4 |
if field.possible_values and field.possible_values.is_a? String |
| 5 |
field.possible_values = field.possible_values.split('|')
|
| 6 |
field.save |
| 7 |
end |
| 8 |
end |
| 9 |
end |
| 10 |
|
| 11 |
def self.down |
| 12 |
end |
| 13 |
end |