1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Fixed the POSt endpoint to accept bracket positions

This commit is contained in:
2025-01-04 16:26:57 -05:00
parent e986ce225b
commit 698576dac9
2 changed files with 15 additions and 1 deletions

View File

@@ -68,7 +68,6 @@ class MatAssignmentRulesController < ApplicationController
# Permit the parameters and convert specific fields to integer arrays
params.require(:mat_assignment_rule).permit(:mat_id, weight_classes: [], bracket_positions: [], rounds: []).tap do |whitelisted|
whitelisted[:weight_classes] = whitelisted[:weight_classes].map(&:to_i)
whitelisted[:bracket_positions] = whitelisted[:bracket_positions].map(&:to_i)
whitelisted[:rounds] = whitelisted[:rounds].map(&:to_i)
end
end