diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 19:15:55 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-09-24 19:15:55 -0400 |
commit | 687299b33934d25017a226ba6b979e44f0b1f441 (patch) | |
tree | b013bbc0384ac691fcb359a78e7e0234c3eb34f5 /app/jobs | |
parent | 2721f3768ebd4d279caa967bee210249d93f92cb (diff) | |
download | pokeviewer-687299b33934d25017a226ba6b979e44f0b1f441.tar.gz pokeviewer-687299b33934d25017a226ba6b979e44f0b1f441.tar.bz2 pokeviewer-687299b33934d25017a226ba6b979e44f0b1f441.zip |
Added box names
Diffstat (limited to 'app/jobs')
-rw-r--r-- | app/jobs/pokeviewer/extract_save_data_job.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 | |||
22 | end | 22 | end |
23 | end | 23 | end |
24 | 24 | ||
25 | args["boxes"].each_with_index do |box_name,index| | ||
26 | box = Box.find_or_initialize_by(trainer: game, number: index) | ||
27 | box.name = box_name | ||
28 | box.save! | ||
29 | end | ||
30 | |||
25 | game.pokemon.clear | 31 | game.pokemon.clear |
26 | 32 | ||
27 | args["pokemon"].each do |param| | 33 | args["pokemon"].each do |param| |