diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 22:55:10 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-06 22:55:10 -0500 |
commit | 01c3f1af652fb32c235ad1c047d652e5148dba94 (patch) | |
tree | 43c047f09a3dd7271590f0ae939ecae05ddc1448 /app/models | |
parent | 7f9720bf101e0c8ef3d2869b76a1fae098f4f3ee (diff) |
fix thing again
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index fa07b60..4d6902a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,6 +1,6 @@ class User < ActiveRecord::Base - 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" + has_and_belongs_to_many :tournaments_played, class_name: "Tournament", foreign_key: "player_id", join_table: "players_tournaments" + has_and_belongs_to_many :tournaments_hosted, class_name: "Tournament", foreign_key: "host_id", join_table: "hosts_tournaments" before_save { self.email = email.downcase } before_save { self.user_name = user_name } |