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

Fixed migration for mat assignment rule

This commit is contained in:
2024-11-25 20:12:36 -05:00
parent ad8e486205
commit 5d37e5e0d8
3 changed files with 22 additions and 21 deletions

View File

@@ -1,4 +1,12 @@
class MatAssignmentRule < ApplicationRecord
belongs_to :mat
belongs_to :tournament
end
belongs_to :mat
belongs_to :tournament
# Ensure default values for JSON fields
# because mysql doesn't allow this
after_initialize do
self.weight_classes ||= []
self.bracket_positions ||= []
self.rounds ||= []
end
end