summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-03-06 22:34:08 -0500
committerAndrewMurrell <amurrel@purdue.edu>2014-03-06 22:34:08 -0500
commit3ce5876375cbb3057ffc96e2886ba57cbd875dc9 (patch)
treee59dc46b293cdcd4ad8ad5b33bd4703f65adb0d9 /app/models/user.rb
parentce8b05ed8fa3466c727269daa47ba7df672fdca1 (diff)
parent70bae69d731afc5300ffa5b176732ebe27d0810f (diff)
Fixed some merge errors in show.html.erb
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index c3a9acb..fa07b60 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,6 +1,6 @@
class User < ActiveRecord::Base
- has_many :user_tournament_pairs
- has_many :tournaments, :through => :user_tournament_pairs
+ has_and_belongs_to_many :tournaments_played, class_name: "Tournament", foreign_key: "tournament_id", join_table: "players_tournaments"
+ has_and_belongs_to_many :tournaments_hosted, class_name: "Tournament", foreign_key: "tournament_id", join_table: "hosts_tournaments"
before_save { self.email = email.downcase }
before_save { self.user_name = user_name }