1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00
Files
wrestlingdev.com/app/models/mat_assignment_rule.rb

13 lines
287 B
Ruby

class MatAssignmentRule < ApplicationRecord
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