summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-04-05 14:42:31 -0700
committerazul <azul@riseup.net>2013-04-05 14:42:31 -0700
commit602229c463c58be9ffb909570155d14d59f6b4d5 (patch)
tree03e74c0b476107abac669b1a25bd681b630b0d43 /core
parent869ba2f363a48d0f76321efc08a228f54aeb6758 (diff)
parente5f81eddc28905a5c823bec32ace78c17755e417 (diff)
Merge pull request #42 from azul/bugfix/fix-migration-requiring-active-record
make sure only our own models are loaded
Diffstat (limited to 'core')
-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