diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-07 11:49:49 -0500 |
commit | 56f5841d4b9c12296cdfcaeff174b2627d59afc8 (patch) | |
tree | 4f7da4ebbe5ee15a1594b26466ed78e2cf10de35 /app/controllers/pokedex_controller.rb | |
parent | c1b0443ba2aebdbd39291ddab0c189f3f4831320 (diff) | |
download | pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.gz pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.tar.bz2 pokeviewer-56f5841d4b9c12296cdfcaeff174b2627d59afc8.zip |
Migrate to full rails app
Diffstat (limited to 'app/controllers/pokedex_controller.rb')
-rw-r--r-- | app/controllers/pokedex_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/pokedex_controller.rb b/app/controllers/pokedex_controller.rb new file mode 100644 index 0000000..81c00e8 --- /dev/null +++ b/app/controllers/pokedex_controller.rb | |||
@@ -0,0 +1,10 @@ | |||
1 | class PokedexController < ApplicationController | ||
2 | def index | ||
3 | @species = Species. | ||
4 | order(id: :asc). | ||
5 | includes(:pokedex_entries). | ||
6 | order("pokedex_entries.trainer_id ASC") | ||
7 | |||
8 | @trainers = Trainer.order(id: :asc) | ||
9 | end | ||
10 | end | ||