diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/pokeviewer/pokemon_controller.rb | 12 |
1 files changed, 8 insertions, 4 deletions
| diff --git a/app/controllers/pokeviewer/pokemon_controller.rb b/app/controllers/pokeviewer/pokemon_controller.rb index 4b49184..49a743c 100644 --- a/app/controllers/pokeviewer/pokemon_controller.rb +++ b/app/controllers/pokeviewer/pokemon_controller.rb | |||
| @@ -21,10 +21,14 @@ module Pokeviewer | |||
| 21 | end | 21 | end |
| 22 | end | 22 | end |
| 23 | 23 | ||
| 24 | if pokemon.peek and pokemon.peek.first == -1 | 24 | @unaccounted = [] |
| 25 | @unaccounted = pokemon.next.second | 25 | |
| 26 | else | 26 | begin |
| 27 | @unaccounted = [] | 27 | if pokemon.peek.first == -1 |
| 28 | @unaccounted = pokemon.next.second | ||
| 29 | end | ||
| 30 | rescue StopIteration | ||
| 31 | # There are no Pokémon, but that's fine. | ||
| 28 | end | 32 | end |
| 29 | 33 | ||
| 30 | @trainers = Trainer.order(id: :asc).all.map do |trainer| | 34 | @trainers = Trainer.order(id: :asc).all.map do |trainer| |
