README.md in rails_failover-1.0.0 vs README.md in rails_failover-2.0.0
- old
+ new
@@ -35,11 +35,12 @@
port: <primary db server port>
replica_host: <replica db server host>
replica_port: <replica db server port>
```
-The gem will automatically create an `ActiveRecord::ConnectionAdapters::ConnectionHandler` with the `ActiveRecord.reading_role` as the `handler_key`.
+The gem will automatically create a role (using `ActiveRecord.reading_role`) on
+the default `ActiveRecord` connection handler.
#### Failover/Fallback Hooks
```ruby
RailsFailover::ActiveRecord.on_failover do
@@ -51,12 +52,10 @@
end
```
#### Multiple connection handlers
-Note: This API is unstable and is likely to change when Rails 6.1 is released with sharding support.
-
```yml
# config/database.yml
production:
primary:
@@ -70,10 +69,10 @@
replica_host: <replica db server host>
replica_port: <replica db server port>
# In your ActiveRecord base model or model.
-connects_to database: { writing: :primary, second_database_writing: :second_database_writing
+connects_to database: { writing: :primary, second_database_writing: :second_database_writing }
```
### Redis
Add `require 'rails_failover/redis'` before creating a `Redis` instance.