mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 21:24:54 +08:00
11 lines
238 B
Ruby
11 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
|