Update README.textile

Use database.yml configuration tweak instead of postgres.conf when ActiveRecord ORM
This commit is contained in:
Jean-Michel Garnier 2013-01-29 11:43:55 +01:00
parent 35e2060667
commit 9d40404c44

View file

@ -226,7 +226,15 @@ DatabaseCleaner has an autodetect mechanism where if you do not explicitly defin
h4. STDERR is being flooded when using Postgres
If you are using Postgres and have foreign key constraints, the truncation strategy will cause a lot of extra noise to appear on STDERR (in
the form of "NOTICE truncate cascades" messages). To silence these warnings set the following log level in your database.yml file:
the form of "NOTICE truncate cascades" messages).
To silence these warnings set the following log level in your postgresql.conf file:
<pre>
client_min_messages = warning
</pre>
For ActiveRecord, you add the following parameter in your database.yml file:
<pre>
test:
@ -235,7 +243,6 @@ test:
min_messages: WARNING
</pre>
h2. Debugging
In rare cases DatabaseCleaner will encounter errors that it will log. By default it uses STDOUT set to the ERROR level but you can configure this to use whatever Logger you desire. Here's an example of using the Rails.logger in env.rb: