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:
3
app/models/match.rb
Normal file
3
app/models/match.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Match < ActiveRecord::Base
|
||||
belongs_to :tournament
|
||||
end
|
||||
@@ -1,4 +1,6 @@
|
||||
class Tournament < ActiveRecord::Base
|
||||
has_many :schools, dependent: :destroy
|
||||
has_many :weights, dependent: :destroy
|
||||
has_many :matches, dependent: :destroy
|
||||
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
class Wrestler < ActiveRecord::Base
|
||||
belongs_to :school
|
||||
belongs_to :weight
|
||||
has_many :matches
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user