scinote-web/db/migrate/20160809074757_update_my_module_coordinate.rb
2016-08-31 11:46:27 +02:00

11 lines
233 B
Ruby

class UpdateMyModuleCoordinate < ActiveRecord::Migration
def change
MyModule.find_each do |my_module|
x = my_module.x
y = my_module.y
x *= 32
y *= 16
my_module.update(x: x, y: y)
end
end
end