1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-05-07 14:52:39 +00:00

Cleaned up a bunch of shit. Depricated model methods and controller methods.

This commit is contained in:
2015-04-15 13:42:12 +00:00
parent 451e6911f8
commit 2b1618c69b
9 changed files with 45 additions and 51 deletions

View File

@@ -7,10 +7,6 @@ class Tournament < ActiveRecord::Base
serialize :matchups_array
def unfinishedMatches
end
def upcomingMatches
if self.matchups_array
return matchupHashesToObjects(self.matchups_array)
@@ -18,15 +14,7 @@ class Tournament < ActiveRecord::Base
@matches = generateMatchups
saveMatchups(@matches)
return @matches
end
end
def destroyAllMatches
@matches_all = Match.where(tournament_id: self.id)
@matches_all.each do |match|
match.destroy
end
end
end
def generateMatchups
@@ -39,7 +27,7 @@ class Tournament < ActiveRecord::Base
end
def assignBouts(matches)
@bouts = Bout.new
@bouts = Boutgen.new
@matches = @bouts.assignBouts(matches)
return @matches
end