README.md in slavery-2.1.0 vs README.md in slavery-2.1.1

- old
+ new

@@ -121,15 +121,29 @@ ## Disable temporarily You can quickly disable slave reads by dropping the following line in `config/initializers/slavery.rb`. ```ruby -Slavely.disabled = true +Slavery.disabled = true ``` With this line, Slavery stops connection switching and all queries go to the master. This may be useful when one of the master or the slave goes down. You would rewrite `database.yml` to make all queries go to the surviving database, until you restore or rebuild the failed one. + +## Transactional fixtures + +When `use_transactional_fixtures` is set to `true`, it's NOT recommended to +write to the database besides fixtures, since the slave connection is not aware +of changes performed in the master connection due to [transaction isolation](https://en.wikipedia.org/wiki/Isolation_(database_systems)). + +In that case, you are suggested to disable Slavery in the test environment by +putting the following in `test/test_helper.rb` +(or `spec/spec_helper.rb` for RSpec users): + +```ruby +Slavery.disabled = true +``` ## Support for non-Rails apps If you're using ActiveRecord in a non-Rails app (e.g. Sinatra), be sure to set `RACK_ENV` environment variable in the boot sequence, then: