1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added when they last wrestled

This commit is contained in:
2015-12-17 13:06:42 +00:00
parent 90bf95cd11
commit ae056ec7f8
2 changed files with 3 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ class Wrestler < ActiveRecord::Base
before_create do
self.tournament.destroyAllMatches
end
def lastFinishedMatch
allMatches.select{|m| m.finished == 1}.sort_by{|m| m.bout_number}.last