From 992dc06e50d74aca79ed58d868be6113e3ebe55c Mon Sep 17 00:00:00 2001 From: Luke Shumaker 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