Skip to content

Commit

Permalink
Fixed that the Query Cache should just be ignored if the database is …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
dhh committed Dec 6, 2007
1 parent 699da70 commit 731ecec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activerecord/CHANGELOG
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,7 @@
*2.0.0* (December 6th, 2007) *2.0.0* (December 6th, 2007)


* 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]

* Fixed that the truncation of strings longer than 50 chars should use inspect so newlines etc are escaped #10385 [norbert] * Fixed that the truncation of strings longer than 50 chars should use inspect so newlines etc are escaped #10385 [norbert]


* Fixed that habtm associations should be able to set :select as part of their definition and have that honored [DHH] * Fixed that habtm associations should be able to set :select as part of their definition and have that honored [DHH]
Expand Down
2 changes: 2 additions & 0 deletions activerecord/lib/active_record/query_cache.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ def cache(&block)
else else
connection.cache(&block) connection.cache(&block)
end end
rescue
yield # if the database is not present, don't let the cache spoil the party
end end


# Disable the query cache within the block if Active Record is configured. # Disable the query cache within the block if Active Record is configured.
Expand Down

0 comments on commit 731ecec

Please sign in to comment.