Fix id and model logged as unpermitted params

by slicing selected attributes from params and permitting them all.
This commit is contained in:
Thor77 2019-04-07 16:09:59 +02:00
parent 8b07c46acd
commit e78de72f3d
No known key found for this signature in database
GPG Key ID: 5051E71B46AA669A
3 changed files with 3 additions and 3 deletions

View File

@ -28,6 +28,6 @@ class MatchScoresController < ApplicationController
# Only allow a trusted parameter "white list" through. # Only allow a trusted parameter "white list" through.
def match_score_params def match_score_params
params.permit(:points) params.slice(:points).permit!
end end
end end

View File

@ -26,6 +26,6 @@ class TeamsController < ApplicationController
end end
def team_params def team_params
params.permit(:name) params.slice(:name).permit!
end end
end end

View File

@ -48,6 +48,6 @@ class TournamentsController < ApplicationController
end end
def tournament_params def tournament_params
params.permit(:name, :description, :public, :teams) params.slice(:name, :description, :public, :teams).permit!
end end
end end