mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
Only update shop_id in migration
This commit is contained in:
parent
f7ce96152b
commit
3d6f698fb9
@ -12,9 +12,8 @@ class ChangeBikeShopId < ActiveRecord::Migration
|
||||
while bikes.map(&:shop_id).include? new_id
|
||||
new_id += 1
|
||||
end
|
||||
bike.shop_id = new_id
|
||||
bike.update_attribute(:shop_id, new_id)
|
||||
end
|
||||
bikes.each(&:save)
|
||||
end
|
||||
|
||||
def down
|
||||
|
Loading…
x
Reference in New Issue
Block a user