|
|
|
@ -50,7 +50,6 @@ class UpdateJournalsForActsAsJournalized < ActiveRecord::Migration |
|
|
|
|
t.string :journalized_type, :limit => 30, :default => "", :null => false |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
custom_field_names = CustomField.all.group_by(&:type)[IssueCustomField].collect(&:name) |
|
|
|
|
Journal.all.each do |j| |
|
|
|
|
# Can't used j.journalized.class.name because the model changes make it nil |
|
|
|
|
j.update_attribute(:journalized_type, j.type.to_s.sub("Journal","")) if j.type.present? |
|
|
|
|