Make Team.belongs_to :tournament optional

necessary for testing TeamController building relationship on create
This commit is contained in:
Thor77 2018-11-25 20:05:10 +01:00
parent b66b189bd9
commit 9d4d39c135
No known key found for this signature in database
GPG Key ID: 5051E71B46AA669A
1 changed files with 1 additions and 1 deletions

View File

@ -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