summaryrefslogtreecommitdiff
path: root/app/controllers/games
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-04-07 20:44:30 -0400
committerDavid Gay <david@davidgay.org>2021-04-07 20:44:30 -0400
commitf27be0dce605412440b6317cd568610f01079f32 (patch)
tree85d81e8e6325cf6ee4209ef87efa0aa5b337e62e /app/controllers/games
parente3bc8b4a01c1615bbe4cade564760cb97bcc2a25 (diff)
PTU pokemon controller and view basic setup
Diffstat (limited to 'app/controllers/games')
-rw-r--r--app/controllers/games/ptu/pokemon_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/games/ptu/pokemon_controller.rb b/app/controllers/games/ptu/pokemon_controller.rb
index 485f03d..e5329a7 100644
--- a/app/controllers/games/ptu/pokemon_controller.rb
+++ b/app/controllers/games/ptu/pokemon_controller.rb
@@ -1,4 +1,8 @@
class Games::Ptu::PokemonController < ApplicationController
+ def index
+ @pokemons = PtuPokemon.all
+ end
+
def show
@pokemon = PtuPokemon.find(params[:id])
end
@@ -18,6 +22,13 @@ class Games::Ptu::PokemonController < ApplicationController
end
end
+ def edit
+ @pokemon = PtuPokemon.find(params[:id])
+ end
+
+ def update
+ end
+
private
def pokemon_params
params.require(:ptu_pokemon).permit(:name, :base_hp, :base_atk, :base_def, :base_spatk, :base_spdef,