summaryrefslogtreecommitdiff
path: root/core/lib/extensions
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-04-05 23:12:16 +0200
committerAzul <azul@leap.se>2013-04-05 23:34:38 +0200
commite5f81eddc28905a5c823bec32ace78c17755e417 (patch)
tree03e74c0b476107abac669b1a25bd681b630b0d43 /core/lib/extensions
parent869ba2f363a48d0f76321efc08a228f54aeb6758 (diff)
make sure only our own models are loaded
This is just a quick hack. we should move all engines to a dir of their own.
Diffstat (limited to 'core/lib/extensions')
-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