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

fixing match wrestler1 and wrestler2

This commit is contained in:
2015-11-02 11:04:40 -05:00
parent af4298b83b
commit 3734258e6c

View File

@@ -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