Created
October 19, 2010 15:16
-
-
Save imajes/634364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/mongoid/railtie.rb b/lib/mongoid/railtie.rb | |
index c10d32b..a2fa9f4 100644 | |
--- a/lib/mongoid/railtie.rb | |
+++ b/lib/mongoid/railtie.rb | |
@@ -10,7 +10,7 @@ module Rails #:nodoc: | |
module Mongoid #:nodoc: | |
class Railtie < Rails::Railtie #:nodoc: | |
- config.generators.orm :mongoid, :migration => false | |
+ config.app_generators.orm :mongoid, :migration => false | |
rake_tasks do | |
load "mongoid/railties/database.rake" | |
diff --git a/lib/rails/mongoid.rb b/lib/rails/mongoid.rb | |
index c3e600c..eb5360f 100644 | |
--- a/lib/rails/mongoid.rb | |
+++ b/lib/rails/mongoid.rb | |
@@ -7,7 +7,7 @@ module Rails #:nodoc: | |
# 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| | |
+ app.config.paths['app/models'].each do |path| | |
Dir.glob("#{path}/**/*.rb").sort.each do |file| | |
require_dependency(file) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment