mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
11 lines
233 B
Ruby
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
|