README in acts_as_readonlyable-0.0.5 vs README in acts_as_readonlyable-0.0.6

- old
+ new

@@ -38,11 +38,11 @@ read_only: database: slave_db host: slave-host -Note: There is no need for more than one read-only database configuration in your database.yml since you can leverage traditional load balancing solutions for slaves. If you still want to use database.yml to spread the load, define multiple entries there and use acts_as_readonlyable [:first_read_only, :second_read_only] +Note: There is no need for more than one read-only database configuration in your database.yml since you can leverage traditional load balancing solutions for slaves. If you still want to use database.yml to spread the load, define multiple entries there and use acts_as_readonlyable [:first_read_only, :second_read_only]. === Sample Model class Fruit < ActiveRecord::Base acts_as_readonlyable :read_only @@ -54,9 +54,14 @@ r.field = 'value' r.save! # executes against the read_write db r.reload # executes against the read_only db r.reload(:readonly => false) # executes against the read_write db + + +=== Transactional Tests Support + +Since there are two connections established, it breaks transactional tests that rely on the fact that all code lives within a single transaction/connection. To address that, the read only mode is disabled when there is no read-only database configuration entry defined in database.yml. In this case the warning is printed to the log file. == Installation As plugin: