summaryrefslogtreecommitdiff
path: root/core/lib
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib')
-rw-r--r--core/lib/extensions/couchrest.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/lib/extensions/couchrest.rb b/core/lib/extensions/couchrest.rb
index 57bb837..b17159b 100644
--- a/core/lib/extensions/couchrest.rb
+++ b/core/lib/extensions/couchrest.rb
@@ -27,7 +27,10 @@ module CouchRest
def self.load_all_models_with_engines
self.load_all_models_without_engines
return unless defined?(Rails)
- Dir[Rails.root + '**/models/**/*.rb'].each do |path|
+ Dir[Rails.root + 'app/models/**/*.rb'].each do |path|
+ require path
+ end
+ Dir[Rails.root + '*/app/models/**/*.rb'].each do |path|
require path
end
end