1
0
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:
2015-10-23 08:53:29 -04:00
parent f204024b23
commit ad9ea9dc42
14 changed files with 76 additions and 72 deletions

View File

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

View File

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