From 28b20270b4c2ef2fded225f2fba4e358753773e9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 28 Nov 2016 06:21:11 +0000 Subject: use symbol instead of string for 'position' in db migrate (#24013) git-svn-id: http://svn.redmine.org/redmine/trunk@16009 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/072_add_enumerations_position.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db/migrate/072_add_enumerations_position.rb') diff --git a/db/migrate/072_add_enumerations_position.rb b/db/migrate/072_add_enumerations_position.rb index cf5646cf9..2834abef1 100644 --- a/db/migrate/072_add_enumerations_position.rb +++ b/db/migrate/072_add_enumerations_position.rb @@ -4,7 +4,7 @@ class AddEnumerationsPosition < ActiveRecord::Migration Enumeration.all.group_by(&:opt).each do |opt, enums| enums.each_with_index do |enum, i| # do not call model callbacks - Enumeration.where({:id => enum.id}).update_all("position = #{i+1}") + Enumeration.where({:id => enum.id}).update_all(:position => (i+1)) end end end -- cgit v1.2.3