mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
First crack at setting an owner for the tournament
This commit is contained in:
@@ -8,6 +8,7 @@ class Tournament < ActiveRecord::Base
|
||||
has_many :mats, dependent: :destroy
|
||||
has_many :wrestlers, through: :weights
|
||||
has_many :matches, dependent: :destroy
|
||||
belongs_to :user
|
||||
|
||||
def tournament_types
|
||||
["Pool to bracket"]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
class User < ActiveRecord::Base
|
||||
# Include default devise modules. Others available are:
|
||||
# :confirmable, :lockable, :timeoutable and :omniauthable
|
||||
has_many :tournaments
|
||||
|
||||
devise :database_authenticatable, :registerable,
|
||||
:recoverable, :rememberable, :trackable, :validatable
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user