diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/games_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/games_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/games_controller.rb b/app/controllers/admin/games_controller.rb index 5bc6de9..ee5fe59 100644 --- a/app/controllers/admin/games_controller.rb +++ b/app/controllers/admin/games_controller.rb | |||
@@ -46,7 +46,7 @@ class Admin::GamesController < Admin::AdminController | |||
46 | private | 46 | private |
47 | 47 | ||
48 | def game_params | 48 | def game_params |
49 | params.require(:game).permit(:title, :description, :status, :progress, :score) | 49 | params.require(:game).permit(:title, :description, :status, :progress, :score, :started_on, :finished_on) |
50 | end | 50 | end |
51 | 51 | ||
52 | def set_section | 52 | def set_section |
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 490e0b0..8ddcf24 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb | |||
@@ -1,6 +1,6 @@ | |||
1 | class GamesController < ApplicationController | 1 | class GamesController < ApplicationController |
2 | def index | 2 | def index |
3 | @games = Game.all | 3 | @games = Game.order(started_on: :desc) |
4 | 4 | ||
5 | if params[:status] | 5 | if params[:status] |
6 | @games = @games.where(status: params[:status]) | 6 | @games = @games.where(status: params[:status]) |