diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-03-12 22:43:12 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-03-12 22:43:12 -0400 |
commit | 837537b14b01a8c7504b786e1bbf7a350c21242a (patch) | |
tree | 23caf4cd2443b11a15db938bea278066a14a9e8b /app/controllers/games_controller.rb | |
parent | 7789e2138fc0479846c20bc68d68973636a4a760 (diff) | |
download | thoughts-837537b14b01a8c7504b786e1bbf7a350c21242a.tar.gz thoughts-837537b14b01a8c7504b786e1bbf7a350c21242a.tar.bz2 thoughts-837537b14b01a8c7504b786e1bbf7a350c21242a.zip |
Game by status filter technically exists
Diffstat (limited to 'app/controllers/games_controller.rb')
-rw-r--r-- | app/controllers/games_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ | |||
1 | class GamesController < ApplicationController | 1 | class GamesController < ApplicationController |
2 | def index | 2 | def index |
3 | @games = Game.all | 3 | @games = Game.all |
4 | |||
5 | if params[:status] | ||
6 | @games = @games.where(status: params[:status]) | ||
7 | end | ||
4 | end | 8 | end |
5 | end | 9 | end |