diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-06 22:05:48 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-12-06 22:05:48 +0000 |
commit | 731ecec15ee306049bc33af6966f877ad4f67d27 (patch) | |
tree | 4ebcda44ec65c066728e23a368450beb75244921 /activerecord/lib/active_record | |
parent | 699da7001b9e3d35c282ab3eb5371ba668bdeaa3 (diff) | |
download | rails-731ecec15ee306049bc33af6966f877ad4f67d27.tar.gz rails-731ecec15ee306049bc33af6966f877ad4f67d27.tar.bz2 rails-731ecec15ee306049bc33af6966f877ad4f67d27.zip |
Fixed that the Query Cache should just be ignored if the database is misconfigured (so that the "About your applications environment" works even before the database has been created) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/query_cache.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/query_cache.rb b/activerecord/lib/active_record/query_cache.rb index a8af89fcb9..e1d77975d3 100644 --- a/activerecord/lib/active_record/query_cache.rb +++ b/activerecord/lib/active_record/query_cache.rb @@ -7,6 +7,8 @@ module ActiveRecord else connection.cache(&block) end + rescue + yield # if the database is not present, don't let the cache spoil the party end # Disable the query cache within the block if Active Record is configured. |