From ae9a64f4e2e7a654e28744f1c8ca98681bb70301 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <shumakl@purdue.edu>
Date: Thu, 24 Apr 2014 16:28:14 -0400
Subject: run ./generate.sh

---
 app/models/api_request.rb  | 2 ++
 app/models/api_requests.rb | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
 create mode 100644 app/models/api_request.rb
 delete mode 100644 app/models/api_requests.rb

(limited to 'app/models')

diff --git a/app/models/api_request.rb b/app/models/api_request.rb
new file mode 100644
index 0000000..ffb7267
--- /dev/null
+++ b/app/models/api_request.rb
@@ -0,0 +1,2 @@
+class ApiRequest < ActiveRecord::Base
+end
diff --git a/app/models/api_requests.rb b/app/models/api_requests.rb
deleted file mode 100644
index 19c76e2..0000000
--- a/app/models/api_requests.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-class ApiRequests < ActiveRecord::Base
-end
-- 
cgit v1.2.3-2-g168b


From 992dc06e50d74aca79ed58d868be6113e3ebe55c Mon Sep 17 00:00:00 2001
From: Luke Shumaker <shumakl@purdue.edu>
Date: Thu, 24 Apr 2014 16:58:57 -0400
Subject: do away with stages_ordered

---
 app/models/tournament.rb | 10 ----------
 1 file changed, 10 deletions(-)

(limited to 'app/models')

diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index e21ccb1..caa711c 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -5,16 +5,6 @@ class Tournament < ActiveRecord::Base
 	has_and_belongs_to_many :players, class_name: "User", association_foreign_key: "player_id", join_table: "players_tournaments"
 	has_and_belongs_to_many :hosts,   class_name: "User", association_foreign_key: "host_id",   join_table: "hosts_tournaments"
 
-	def stages_ordered
-		h = {}
-		i = 1
-		self.tournament_stages.order(:id).each do |s|
-			h[i] = s
-			i += 1
-		end
-		return h
-	end
-
 	def settings
 		@settings ||= Settings.new(self)
 	end
-- 
cgit v1.2.3-2-g168b


From 27c3e207b299e6c5a94a1ab81412bb9e11a0d92a Mon Sep 17 00:00:00 2001
From: Luke Shumaker <shumakl@purdue.edu>
Date: Thu, 24 Apr 2014 17:01:42 -0400
Subject: rename Tournament#tournament_stages to Tournament#stages

---
 app/models/tournament.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'app/models')

diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index caa711c..861be6c 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -1,6 +1,6 @@
 class Tournament < ActiveRecord::Base
 	belongs_to :game
-	has_many :tournament_stages
+	has_many :stages, class_name: "TournamentStage"
 	has_many :settings_raw, class_name: "TournamentSetting"
 	has_and_belongs_to_many :players, class_name: "User", association_foreign_key: "player_id", join_table: "players_tournaments"
 	has_and_belongs_to_many :hosts,   class_name: "User", association_foreign_key: "host_id",   join_table: "hosts_tournaments"
-- 
cgit v1.2.3-2-g168b