diff --git a/db/migrate/20131019023429_change_bike_shop_id.rb b/db/migrate/20131019023429_change_bike_shop_id.rb index 5503edf..e82610c 100644 --- a/db/migrate/20131019023429_change_bike_shop_id.rb +++ b/db/migrate/20131019023429_change_bike_shop_id.rb @@ -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