Make Team.belongs_to :tournament optional
necessary for testing TeamController building relationship on create
This commit is contained in:
parent
b66b189bd9
commit
9d4d39c135
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Team < ApplicationRecord
|
class Team < ApplicationRecord
|
||||||
belongs_to :tournament
|
belongs_to :tournament, optional: true
|
||||||
has_many :group_scores, dependent: :destroy
|
has_many :group_scores, dependent: :destroy
|
||||||
has_many :scores, dependent: :destroy
|
has_many :scores, dependent: :destroy
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue