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.
|
# 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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue