From 1f67557fca317c44a7f81c5ad682aaa8bf4f7b5c Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 21 Apr 2015 22:31:29 -0400 Subject: [PATCH] Saving matchups_array --- app/models/tournament.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/tournament.rb b/app/models/tournament.rb index 46c436c..317b5b1 100644 --- a/app/models/tournament.rb +++ b/app/models/tournament.rb @@ -8,14 +8,14 @@ class Tournament < ActiveRecord::Base serialize :matchups_array def upcomingMatches - @matches = generateMatchups - # if self.matchups_array - # return matchupHashesToObjects(self.matchups_array) - # else - # @matches = generateMatchups - # saveMatchups(@matches) - # return @matches - # end + # @matches = generateMatchups + if self.matchups_array + return matchupHashesToObjects(self.matchups_array) + else + @matches = generateMatchups + saveMatchups(@matches) + return @matches + end end def generateMatchups