Fix id and model logged as unpermitted params
by slicing selected attributes from params and permitting them all.
This commit is contained in:
parent
8b07c46acd
commit
e78de72f3d
|
|
@ -28,6 +28,6 @@ class MatchScoresController < ApplicationController
|
|||
|
||||
# Only allow a trusted parameter "white list" through.
|
||||
def match_score_params
|
||||
params.permit(:points)
|
||||
params.slice(:points).permit!
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,6 +26,6 @@ class TeamsController < ApplicationController
|
|||
end
|
||||
|
||||
def team_params
|
||||
params.permit(:name)
|
||||
params.slice(:name).permit!
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ class TournamentsController < ApplicationController
|
|||
end
|
||||
|
||||
def tournament_params
|
||||
params.permit(:name, :description, :public, :teams)
|
||||
params.slice(:name, :description, :public, :teams).permit!
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue