From 8b07c46acd490de9902e4d85b5c6d02bc8740e91 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sun, 7 Apr 2019 14:00:06 +0200 Subject: [PATCH] Permit parameters without root key --- app/controllers/match_scores_controller.rb | 2 +- app/controllers/teams_controller.rb | 2 +- app/controllers/tournaments_controller.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/match_scores_controller.rb b/app/controllers/match_scores_controller.rb index daffca8..f5c2f34 100644 --- a/app/controllers/match_scores_controller.rb +++ b/app/controllers/match_scores_controller.rb @@ -28,6 +28,6 @@ class MatchScoresController < ApplicationController # Only allow a trusted parameter "white list" through. def match_score_params - params.require(:match_score).permit(:points) + params.permit(:points) end end diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 9ac727e..bf57444 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -26,6 +26,6 @@ class TeamsController < ApplicationController end def team_params - params.require(:team).permit(:name) + params.permit(:name) end end diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 0bb0334..d69f8d6 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -48,6 +48,6 @@ class TournamentsController < ApplicationController end def tournament_params - params.require(:tournament).permit(:name, :description, :public, :teams) + params.permit(:name, :description, :public, :teams) end end