about summary refs log tree commit diff stats
path: root/app/controllers/games_controller.rb
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2019-03-13 15:49:31 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2019-03-13 15:49:31 -0400
commitb2f6c33bc1f3ea67f0bb643ec4c777b805cfc099 (patch)
tree0e8089d205998471b8454dc9f4fb2aee133866a5 /app/controllers/games_controller.rb
parentb62d43ccde70aa6fccf5341e57a695a2cfb289c1 (diff)
downloadthoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.tar.gz
thoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.tar.bz2
thoughts-b2f6c33bc1f3ea67f0bb643ec4c777b805cfc099.zip
Fixed unsorted Game list
Diffstat (limited to 'app/controllers/games_controller.rb')
-rw-r--r--app/controllers/games_controller.rb4
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
21end 21end