forked from OpenNeo/impress
ugh, fine, save the pets sequentially
This commit is contained in:
parent
206811a2fb
commit
482b1a155d
1 changed files with 1 additions and 1 deletions
|
@ -104,9 +104,9 @@ class Pet < ActiveRecord::Base
|
||||||
Rails.logger.info "Reloading #{name} in #{locale}"
|
Rails.logger.info "Reloading #{name} in #{locale}"
|
||||||
reloaded_pet = Pet.load(name, :item_scope => Item.includes(:translations),
|
reloaded_pet = Pet.load(name, :item_scope => Item.includes(:translations),
|
||||||
:locale => locale)
|
:locale => locale)
|
||||||
Pet.connection_pool.with_connection { reloaded_pet.save! }
|
|
||||||
last_pet_loaded = reloaded_pet
|
last_pet_loaded = reloaded_pet
|
||||||
end
|
end
|
||||||
|
reloaded_pets.each(&:save!)
|
||||||
previous_candidates = candidates
|
previous_candidates = candidates
|
||||||
candidates = last_pet_loaded.item_translation_candidates
|
candidates = last_pet_loaded.item_translation_candidates
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue