summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/tournament.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index 47cda7e..97eee57 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -107,7 +107,7 @@ class Tournament < ActiveRecord::Base
end
def sampling_methods
- make_methods("sampling").collect do |name|
+ make_methods("sampling").select do |name|
"Sampling::#{name.camelcase}".constantize.works_with?(self.game)
end
end
@@ -120,6 +120,7 @@ class Tournament < ActiveRecord::Base
make_methods "seeding"
end
+ private
def make_methods(dir)
@@methods ||= {}
if @@methods[dir].nil? or Rails.env.development?