From 482b1a155dba962affeece558ac9eeace2773980 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 28 Jan 2013 03:02:20 -0600 Subject: [PATCH] ugh, fine, save the pets sequentially --- app/models/pet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/pet.rb b/app/models/pet.rb index 567954ed..afd2f2a6 100644 --- a/app/models/pet.rb +++ b/app/models/pet.rb @@ -104,9 +104,9 @@ class Pet < ActiveRecord::Base Rails.logger.info "Reloading #{name} in #{locale}" reloaded_pet = Pet.load(name, :item_scope => Item.includes(:translations), :locale => locale) - Pet.connection_pool.with_connection { reloaded_pet.save! } last_pet_loaded = reloaded_pet end + reloaded_pets.each(&:save!) previous_candidates = candidates candidates = last_pet_loaded.item_translation_candidates