1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 05:43:47 +00:00

Added matches scaffold and ascended views of weights and schools

This commit is contained in:
Jacob Cody Wimer
2014-01-24 15:16:33 -05:00
parent ec17963c28
commit 7f8718af35
24 changed files with 339 additions and 4 deletions

3
app/models/match.rb Normal file
View File

@@ -0,0 +1,3 @@
class Match < ActiveRecord::Base
belongs_to :tournament
end

View File

@@ -1,4 +1,6 @@
class Tournament < ActiveRecord::Base
has_many :schools, dependent: :destroy
has_many :weights, dependent: :destroy
has_many :matches, dependent: :destroy
end

View File

@@ -1,4 +1,5 @@
class Wrestler < ActiveRecord::Base
belongs_to :school
belongs_to :weight
has_many :matches
end