lib/rails/mongoid.rb in mongoid-2.0.0.rc.1 vs lib/rails/mongoid.rb in mongoid-2.0.0.rc.2
- old
+ new
@@ -7,10 +7,10 @@
# that indexing and inheritance work in both development and production
# with the same results.
def load_models(app)
app.config.paths['app/models'].each do |path|
Dir.glob("#{path}/**/*.rb").sort.each do |file|
- require_dependency(file)
+ require_dependency(File.basename(file, ".rb"))
end
end
end
# Recursive function to create all the indexes for the model, then