From 687299b33934d25017a226ba6b979e44f0b1f441 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 24 Sep 2017 19:15:55 -0400 Subject: Added box names --- app/jobs/pokeviewer/extract_save_data_job.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/jobs') diff --git a/app/jobs/pokeviewer/extract_save_data_job.rb b/app/jobs/pokeviewer/extract_save_data_job.rb index 404716a..3409a5f 100644 --- a/app/jobs/pokeviewer/extract_save_data_job.rb +++ b/app/jobs/pokeviewer/extract_save_data_job.rb @@ -22,6 +22,12 @@ module Pokeviewer end end + args["boxes"].each_with_index do |box_name,index| + box = Box.find_or_initialize_by(trainer: game, number: index) + box.name = box_name + box.save! + end + game.pokemon.clear args["pokemon"].each do |param| -- cgit 1.4.1