summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/pokedex_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/pokedex_controller.rb b/app/controllers/pokedex_controller.rb
index 062373e..21ee44a 100644
--- a/app/controllers/pokedex_controller.rb
+++ b/app/controllers/pokedex_controller.rb
@@ -1,3 +1,11 @@
class PokedexController < ApplicationController
+ before_action :set_user
+
def index; end
+
+protected
+
+ def set_user
+ @user = User.find(params[:user_id])
+ end
end