summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:45:22 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-22 02:45:22 -0400
commit7d40d2ed8bd686b32ff9bc620936a72044a610bc (patch)
tree4e46ac6a1fca51e272837ef0d8f5921f3991e914 /app/models
parentd3bee0f1ce0c5dc3fa741338bc6d9914e9e92787 (diff)
parent07476fd9a2b942e8d6056804bb1cdbd5e9a1c528 (diff)
Merge branch 'clean2'
Conflicts: app/controllers/tournaments_controller.rb app/models/match.rb app/views/matches/index.html.erb app/views/matches/show.html.erb app/views/tournaments/index.html.erb app/views/tournaments/show.html.erb
Diffstat (limited to 'app/models')
-rw-r--r--app/models/match.rb3
-rw-r--r--app/models/statistic.rb (renamed from app/models/score.rb)2
-rw-r--r--app/models/tournament_stage.rb3
3 files changed, 5 insertions, 3 deletions
diff --git a/app/models/match.rb b/app/models/match.rb
index ac74fe1..e37f9dc 100644
--- a/app/models/match.rb
+++ b/app/models/match.rb
@@ -1,5 +1,5 @@
class Match < ActiveRecord::Base
- belongs_to :tournament
+ belongs_to :tournament_stage
has_many :scores
has_and_belongs_to_many :teams
@@ -37,5 +37,4 @@ class Match < ActiveRecord::Base
end #while
end
#handle_asynchronously :is_match_over
-
end
diff --git a/app/models/score.rb b/app/models/statistic.rb
index 11ee9a6..341fd9d 100644
--- a/app/models/score.rb
+++ b/app/models/statistic.rb
@@ -1,4 +1,4 @@
-class Score < ActiveRecord::Base
+class Statistic < ActiveRecord::Base
belongs_to :user
belongs_to :match
end
diff --git a/app/models/tournament_stage.rb b/app/models/tournament_stage.rb
new file mode 100644
index 0000000..205c8cc
--- /dev/null
+++ b/app/models/tournament_stage.rb
@@ -0,0 +1,3 @@
+class TournamentStage < ActiveRecord::Base
+ belongs_to :tournament
+end