diff options
author | azul <azul@riseup.net> | 2013-04-05 14:42:31 -0700 |
---|---|---|
committer | azul <azul@riseup.net> | 2013-04-05 14:42:31 -0700 |
commit | 602229c463c58be9ffb909570155d14d59f6b4d5 (patch) | |
tree | 03e74c0b476107abac669b1a25bd681b630b0d43 /core | |
parent | 869ba2f363a48d0f76321efc08a228f54aeb6758 (diff) | |
parent | e5f81eddc28905a5c823bec32ace78c17755e417 (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.rb | 5 |
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 |