scinote-web/db/migrate/20160809074757_update_my_module_coordinate.rb
2017-06-30 10:23:28 +02:00

12 lines
238 B
Ruby

class UpdateMyModuleCoordinate < ActiveRecord::Migration[4.2]
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