summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-03-06 17:45:22 -0500
committerDavisLWebb <davislwebb@ymail.com>2014-03-06 17:45:22 -0500
commit0c1299795a492e6296eb8e15bca576ea5139be6b (patch)
tree3921daf8c26d656b12b20ee22be63c97fa20f6fa /app/models
parent110d67f433c091a3b739c5bbebe110d963efaa73 (diff)
parentfe7d5ad458b4cabd8fd57b47f81abc56dd8532ad (diff)
Merge branch 'master' of http://github.com/LukeShu/leaguer
Conflicts: app/controllers/sessions_controller.rb app/views/sessions/new.html.erb
Diffstat (limited to 'app/models')
-rw-r--r--app/models/game_attribute.rb3
-rw-r--r--app/models/game_option.rb2
-rw-r--r--app/models/score.rb4
-rw-r--r--app/models/team.rb1
-rw-r--r--app/models/tournament.rb1
-rw-r--r--app/models/tournament_option.rb1
-rw-r--r--app/models/tournament_user_pair.rb4
7 files changed, 13 insertions, 3 deletions
diff --git a/app/models/game_attribute.rb b/app/models/game_attribute.rb
deleted file mode 100644
index c12723b..0000000
--- a/app/models/game_attribute.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class GameAttribute < ActiveRecord::Base
- belongs_to :game
-end
diff --git a/app/models/game_option.rb b/app/models/game_option.rb
new file mode 100644
index 0000000..bdc5560
--- /dev/null
+++ b/app/models/game_option.rb
@@ -0,0 +1,2 @@
+class GameOption < ActiveRecord::Base
+end
diff --git a/app/models/score.rb b/app/models/score.rb
new file mode 100644
index 0000000..a9b9c71
--- /dev/null
+++ b/app/models/score.rb
@@ -0,0 +1,4 @@
+class Score < ActiveRecord::Base
+ belongs_to :user
+ belongs_to :match
+end
diff --git a/app/models/team.rb b/app/models/team.rb
index fa7ba9e..9e71557 100644
--- a/app/models/team.rb
+++ b/app/models/team.rb
@@ -1,2 +1,3 @@
class Team < ActiveRecord::Base
+ belongs_to :match
end
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index cc915a0..5e8ddfe 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -1,3 +1,4 @@
class Tournament < ActiveRecord::Base
belongs_to :game
+ has_many :matches
end
diff --git a/app/models/tournament_option.rb b/app/models/tournament_option.rb
index 950b351..242a6f6 100644
--- a/app/models/tournament_option.rb
+++ b/app/models/tournament_option.rb
@@ -1,2 +1,3 @@
class TournamentOption < ActiveRecord::Base
+ belongs_to :tournament
end
diff --git a/app/models/tournament_user_pair.rb b/app/models/tournament_user_pair.rb
new file mode 100644
index 0000000..eb4e9c5
--- /dev/null
+++ b/app/models/tournament_user_pair.rb
@@ -0,0 +1,4 @@
+class TournamentUserPair < ActiveRecord::Base
+ belongs_to :tournament
+ belongs_to :user
+end