mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-17 13:24:36 +00:00
Made pool and bout classes. Still need to fix bouts doubling on every
refresh of upcoming matches view
This commit is contained in:
11
app/models/bout.rb
Normal file
11
app/models/bout.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Bout
|
||||
attr_accessor :w1, :w2, :tournament_id
|
||||
def self.all
|
||||
ObjectSpace.each_object(self).to_a
|
||||
end
|
||||
|
||||
def self.count
|
||||
all.count
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user