Build Matches without saving directly to database
This commit is contained in:
parent
f93c714e1a
commit
23249ee93b
|
|
@ -23,8 +23,8 @@ class GroupStageService
|
||||||
match = Match.new state: :not_started,
|
match = Match.new state: :not_started,
|
||||||
position: i,
|
position: i,
|
||||||
match_scores: [
|
match_scores: [
|
||||||
MatchScore.create(team: matchup.first),
|
MatchScore.new(team: matchup.first),
|
||||||
MatchScore.create(team: matchup.second)
|
MatchScore.new(team: matchup.second)
|
||||||
]
|
]
|
||||||
matches << match
|
matches << match
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue