diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-03-13 15:49:31 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2019-03-13 15:49:31 -0400 |
commit | b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099 (patch) | |
tree | 0e8089d205998471b8454dc9f4fb2aee133866a5 /app | |
parent | b62d43ccde70aa6fccf5341e57a695a2cfb289c1 (diff) | |
download | thoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.tar.gz thoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.tar.bz2 thoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.zip |
Fixed unsorted Game list
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 |