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/assets/stylesheets/main/games.scss | 4 ++-- app/controllers/games_controller.rb | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/assets/stylesheets/main/games.scss b/app/assets/stylesheets/main/games.scss index 5c39701..db495e2 100644 --- a/app/assets/stylesheets/main/games.scss +++ b/app/assets/stylesheets/main/games.scss @@ -6,11 +6,11 @@ width: 100%; tr { - &.even { + &.odd { background-color: #fff; } - &.odd { + &.even { background-color: #edf; } } 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