From 837537b14b01a8c7504b786e1bbf7a350c21242a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 12 Mar 2019 22:43:12 -0400 Subject: Game by status filter technically exists --- app/controllers/games_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers/games_controller.rb') diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 7d95b2c..490e0b0 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -1,5 +1,9 @@ class GamesController < ApplicationController def index @games = Game.all + + if params[:status] + @games = @games.where(status: params[:status]) + end end end -- cgit 1.4.1