Update a problematic migration

This commit is contained in:
Luka Murn 2016-08-31 11:46:27 +02:00 committed by GitHub
parent ae9959dc3c
commit bd414c8b4f

View file

@ -1,12 +1,11 @@
class UpdateMyModuleCoordinate < ActiveRecord::Migration class UpdateMyModuleCoordinate < ActiveRecord::Migration
def change def change
MyModule.all.each do |my_module| MyModule.find_each do |my_module|
x = my_module.x x = my_module.x
y = my_module.y y = my_module.y
x *= 32 x *= 32
y *= 16 y *= 16
my_module.update(x: x) my_module.update(x: x, y: y)
my_module.update(y: y)
end end
end end
end end