about summary refs log tree commit diff stats
path: root/app/views
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-10-03 16:18:46 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-10-03 16:18:46 -0400
commit4bc96847f621c4cb3940fe99b3b4b67b20596189 (patch)
treec5b0e651e1ed0663a5eabc29966ca9778cdcd5eb /app/views
parentb618e52428bb659cb1fe3bdbe3d3763d48b4556c (diff)
downloadpokeviewer-4bc96847f621c4cb3940fe99b3b4b67b20596189.tar.gz
pokeviewer-4bc96847f621c4cb3940fe99b3b4b67b20596189.tar.bz2
pokeviewer-4bc96847f621c4cb3940fe99b3b4b67b20596189.zip
Removed box model
It seemed kind of strange to have a model that there should always be
exactly 14 of for each of the parent (Trainer) model instances, so the
box names were moved into the Trainer model, and the Box model was
removed.

This commit also adds some eager loading to speed up page loading times.

Also made a small change to the way the gift ribbons are extracted.

refs #2
Diffstat (limited to 'app/views')
-rw-r--r--app/views/pokeviewer/pokemon/index.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/pokeviewer/pokemon/index.html.haml b/app/views/pokeviewer/pokemon/index.html.haml index f16f0bc..0be3edd 100644 --- a/app/views/pokeviewer/pokemon/index.html.haml +++ b/app/views/pokeviewer/pokemon/index.html.haml
@@ -12,9 +12,9 @@
12 %span.party-name= link_to p.revisions.last.nickname, p 12 %span.party-name= link_to p.revisions.last.nickname, p
13 - trainer.boxes.each do |box| 13 - trainer.boxes.each do |box|
14 .pc-box 14 .pc-box
15 %h3= box.name 15 %h3= box[:name]
16 %table.pc-contents 16 %table.pc-contents
17 - box.contents.each_slice(6) do |row| 17 - box[:pokemon].each_slice(6) do |row|
18 %tr 18 %tr
19 - row.each do |p| 19 - row.each do |p|
20 %td.pc-pokemon.pkv-has-hover 20 %td.pc-pokemon.pkv-has-hover