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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user