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

Added a finished_at column on matches, created a callback to updated that only if finished changes and is 1, and display that on the match stats page.

This commit is contained in:
2025-01-22 17:01:06 -05:00
parent f6bc7aa1a4
commit 5114ed7b08
8 changed files with 98 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ class MatchesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def match_params
params.require(:match).permit(:w1, :w2, :w1_stat, :w2_stat, :winner_id, :win_type, :score, :overtime_type, :finished)
params.require(:match).permit(:w1, :w2, :w1_stat, :w2_stat, :winner_id, :win_type, :score, :overtime_type, :finished, :round)
end
def check_access