diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/games_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/tournaments_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 09119c8..3ccd7be 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -67,6 +67,6 @@ class GamesController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def game_params - params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method) + params.require(:game).permit(:parent_id, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method) end end diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index e5cfb81..8752298 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -181,7 +181,7 @@ class TournamentsController < ApplicationController def tournament_attribute_params params[:num_stages] ||= 1 if params[:tournament] - p = params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :set_rounds, :randomized_teams, :sampling_method, :scoring_method) + p = params.require(:tournament).permit(:game_id, :status, :name, :min_players_per_team, :max_players_per_team, :min_teams_per_match, :max_teams_per_match, :sampling_method, :scoring_method) if p[:game_id] game = Game.find(p[:game_id]) p[:min_players_per_team] ||= game.min_players_per_team |