summaryrefslogtreecommitdiffstats
path: root/db/migrate/078_add_custom_fields_position.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/078_add_custom_fields_position.rb')
-rw-r--r--db/migrate/078_add_custom_fields_position.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/078_add_custom_fields_position.rb b/db/migrate/078_add_custom_fields_position.rb
index cb29098fd..ef940eb02 100644
--- a/db/migrate/078_add_custom_fields_position.rb
+++ b/db/migrate/078_add_custom_fields_position.rb
@@ -4,7 +4,7 @@ class AddCustomFieldsPosition < ActiveRecord::Migration
CustomField.all.group_by(&:type).each do |t, fields|
fields.each_with_index do |field, i|
# do not call model callbacks
- CustomField.update_all "position = #{i+1}", {:id => field.id}
+ CustomField.where({:id => field.id}).update_all("position = #{i+1}")
end
end
end