diff --git a/db/migrate/20160809074757_update_my_module_coordinate.rb b/db/migrate/20160809074757_update_my_module_coordinate.rb index 8e485aa3b..8c2998c04 100644 --- a/db/migrate/20160809074757_update_my_module_coordinate.rb +++ b/db/migrate/20160809074757_update_my_module_coordinate.rb @@ -1,12 +1,12 @@ class UpdateMyModuleCoordinate < ActiveRecord::Migration - def change - MyModule.all.each do |my_module| - x = my_module.x - y = my_module.y - x = x * 32 - y = y * 16 - my_module.update(x: x) - my_module.update(y: y) + def change + MyModule.all.each do |my_module| + x = my_module.x + y = my_module.y + x *= 32 + y *= 16 + my_module.update(x: x) + my_module.update(y: y) + end end - end end