mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 07:46:17 +01:00
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user