summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/tournament.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/tournament.rb b/app/models/tournament.rb
index 09a1abb..0a8ab8d 100644
--- a/app/models/tournament.rb
+++ b/app/models/tournament.rb
@@ -96,8 +96,8 @@ class Tournament < ActiveRecord::Base
# YISSSSSS
def self.make_methods(dir)
- if @methods[dir].nil? or Rails.env.development?
- @methods[dir] = Dir.glob("#{Rails.root}/lib/#{dir}/*.rb").map{|filename| filename.split('/').last.sub(/\.rb$/, '')}
+ if @methods.nil? or @methods[dir].nil? or Rails.env.development?
+ @methods[dir] = Dir.glob("#{Rails.root}/lib/#{dir}/*.rb").map{|filename| File.basename(filename) }
end
return @methods[dir]
end