diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/games_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index dcbe226..a1405b9 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb | |||
@@ -12,10 +12,10 @@ class GamesController < ApplicationController | |||
12 | private | 12 | private |
13 | 13 | ||
14 | def sort_column | 14 | def sort_column |
15 | Game.column_names.include?(params[:sort]) ? params[:sort] : "started_on" | 15 | (params[:sort] and Game.column_names.include?(params[:sort])) ? params[:sort] : "started_on" |
16 | end | 16 | end |
17 | 17 | ||
18 | def sort_direction | 18 | def sort_direction |
19 | %[asc desc].include?(params[:dir]) ? params[:dir] : "asc" | 19 | (params[:dir] and %[asc desc].include?(params[:dir])) ? params[:dir] : "asc" |
20 | end | 20 | end |
21 | end | 21 | end |