From 3734258e6c07be368a5b7f5c32636664049df783 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Mon, 2 Nov 2015 11:04:40 -0500 Subject: [PATCH] fixing match wrestler1 and wrestler2 --- app/models/match.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/match.rb b/app/models/match.rb index 51cce5d..bd44724 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -32,11 +32,11 @@ class Match < ActiveRecord::Base end def wrestler1 - wrestlers.where(id: self.w1) + wrestlers.select{|w| w.id == self.w1}.first end def wrestler2 - wrestlers.where(id: self.w2) + wrestlers.select{|w| w.id == self.w2}.first end def w1_name