mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-13 16:40:48 +00:00
Added a finished_at column on matches, created a callback to updated that only if finished changes and is 1, and display that on the match stats page.
This commit is contained in:
@@ -18,7 +18,7 @@ class Wrestler < ApplicationRecord
|
||||
|
||||
|
||||
def last_finished_match
|
||||
all_matches.select{|m| m.finished == 1}.sort_by{|m| m.bout_number}.last
|
||||
all_matches.select{|m| m.finished == 1}.sort_by{|m| m.finished_at}.last
|
||||
end
|
||||
|
||||
def total_team_points
|
||||
|
||||
Reference in New Issue
Block a user