diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-27 03:04:09 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-27 03:04:09 -0400 |
commit | 987b3e0d151d58c6b44e16e3ec4d13ce7f303fe7 (patch) | |
tree | 24971fe4b80e1dd4b6d27b9041945ffb7163748d /app/models/tournament.rb | |
parent | 125d861972b9fcd99147d67b0e8fe4102f96190e (diff) |
get the tournament creation page complete
Diffstat (limited to 'app/models/tournament.rb')
-rw-r--r-- | app/models/tournament.rb | 3 |
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? |