From 23249ee93b1c362fd6111efdf444765f084bd6e0 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Thu, 2 May 2019 15:17:32 +0200 Subject: [PATCH] Build Matches without saving directly to database --- app/services/group_stage_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/group_stage_service.rb b/app/services/group_stage_service.rb index f31d14c..0c2b7d7 100644 --- a/app/services/group_stage_service.rb +++ b/app/services/group_stage_service.rb @@ -23,8 +23,8 @@ class GroupStageService match = Match.new state: :not_started, position: i, match_scores: [ - MatchScore.create(team: matchup.first), - MatchScore.create(team: matchup.second) + MatchScore.new(team: matchup.first), + MatchScore.new(team: matchup.second) ] matches << match end