about summary refs log tree commit diff stats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/pokeviewer/pokedex_controller.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/pokeviewer/pokedex_controller.rb b/app/controllers/pokeviewer/pokedex_controller.rb new file mode 100644 index 0000000..8286977 --- /dev/null +++ b/app/controllers/pokeviewer/pokedex_controller.rb
@@ -0,0 +1,14 @@
1require_dependency "pokeviewer/application_controller"
2
3module Pokeviewer
4 class PokedexController < ApplicationController
5 def index
6 @species = Species.
7 order(id: :asc).
8 includes(:pokedex_entries).
9 order("pokeviewer_pokedex_entries.trainer_id ASC")
10
11 @trainers = Trainer.order(id: :asc)
12 end
13 end
14end