about summary refs log tree commit diff stats
path: root/test
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 /test
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 'test')
-rw-r--r--test/dummy/db/schema.rb26
1 files changed, 15 insertions, 11 deletions
diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 87db1f8..b1c02e3 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb
@@ -10,17 +10,7 @@
10# 10#
11# It's strongly recommended that you check this file into your version control system. 11# It's strongly recommended that you check this file into your version control system.
12 12
13ActiveRecord::Schema.define(version: 20171003154157) do 13ActiveRecord::Schema.define(version: 20171003191205) do
14
15 create_table "pokeviewer_boxes", force: :cascade do |t|
16 t.integer "trainer_id", null: false
17 t.integer "number", null: false
18 t.string "name", null: false
19 t.datetime "created_at", null: false
20 t.datetime "updated_at", null: false
21 t.index ["trainer_id", "number"], name: "index_pokeviewer_boxes_on_trainer_id_and_number", unique: true
22 t.index ["trainer_id"], name: "index_pokeviewer_boxes_on_trainer_id"
23 end
24 14
25 create_table "pokeviewer_gift_ribbons", force: :cascade do |t| 15 create_table "pokeviewer_gift_ribbons", force: :cascade do |t|
26 t.string "description", null: false 16 t.string "description", null: false
@@ -158,6 +148,20 @@ ActiveRecord::Schema.define(version: 20171003154157) do
158 t.integer "national_ribbon_id" 148 t.integer "national_ribbon_id"
159 t.integer "earth_ribbon_id" 149 t.integer "earth_ribbon_id"
160 t.integer "world_ribbon_id" 150 t.integer "world_ribbon_id"
151 t.string "box_1_name", null: false
152 t.string "box_2_name", null: false
153 t.string "box_3_name", null: false
154 t.string "box_4_name", null: false
155 t.string "box_5_name", null: false
156 t.string "box_6_name", null: false
157 t.string "box_7_name", null: false
158 t.string "box_8_name", null: false
159 t.string "box_9_name", null: false
160 t.string "box_10_name", null: false
161 t.string "box_11_name", null: false
162 t.string "box_12_name", null: false
163 t.string "box_13_name", null: false
164 t.string "box_14_name", null: false
161 t.index ["country_ribbon_id"], name: "index_pokeviewer_trainers_on_country_ribbon_id" 165 t.index ["country_ribbon_id"], name: "index_pokeviewer_trainers_on_country_ribbon_id"
162 t.index ["earth_ribbon_id"], name: "index_pokeviewer_trainers_on_earth_ribbon_id" 166 t.index ["earth_ribbon_id"], name: "index_pokeviewer_trainers_on_earth_ribbon_id"
163 t.index ["land_ribbon_id"], name: "index_pokeviewer_trainers_on_land_ribbon_id" 167 t.index ["land_ribbon_id"], name: "index_pokeviewer_trainers_on_land_ribbon_id"