From 4bc96847f621c4cb3940fe99b3b4b67b20596189 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 3 Oct 2017 16:18:46 -0400 Subject: 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 --- app/views/pokeviewer/pokemon/index.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') 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 @@ %span.party-name= link_to p.revisions.last.nickname, p - trainer.boxes.each do |box| .pc-box - %h3= box.name + %h3= box[:name] %table.pc-contents - - box.contents.each_slice(6) do |row| + - box[:pokemon].each_slice(6) do |row| %tr - row.each do |p| %td.pc-pokemon.pkv-has-hover -- cgit 1.4.1