summaryrefslogtreecommitdiff
path: root/app/models/tournament.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/tournament.rb')
-rw-r--r--app/models/tournament.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index e21ccb1..861be6c 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -1,20 +1,10 @@
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"
- 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