aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_multiple_databases.md
diff options
context:
space:
mode:
authorAkshay Mohite <akshaymohite31@yahoo.com>2019-06-06 13:26:25 +0530
committerAkshay Mohite <akshaymohite31@yahoo.com>2019-06-06 13:33:51 +0530
commit9ed0bedff1aa4f97757117ab463b674854794a71 (patch)
tree620bc46ee98132d6689a6ec32d897a5074d769de /guides/source/active_record_multiple_databases.md
parent76d260797eb4195ad5dac916e46467f097ec375f (diff)
downloadrails-9ed0bedff1aa4f97757117ab463b674854794a71.tar.gz
rails-9ed0bedff1aa4f97757117ab463b674854794a71.tar.bz2
rails-9ed0bedff1aa4f97757117ab463b674854794a71.zip
Fixed a couple of typos, word 'deliberately' and database_resolver_context class name. [ci skip]
Diffstat (limited to 'guides/source/active_record_multiple_databases.md')
-rw-r--r--guides/source/active_record_multiple_databases.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/active_record_multiple_databases.md b/guides/source/active_record_multiple_databases.md
index e2c7878118..51f5cab2aa 100644
--- a/guides/source/active_record_multiple_databases.md
+++ b/guides/source/active_record_multiple_databases.md
@@ -191,7 +191,7 @@ should change this based on your database infrastructure. Rails doesn't guarante
a recent write" for other users within the delay window and will send GET and HEAD requests
to the replicas unless they wrote recently.
-The automatic connection switching in Rails is relatively primitive and deliberatly doesn't
+The automatic connection switching in Rails is relatively primitive and deliberately doesn't
do a whole lot. The goal was a system that demonstrated how to do automatic connection
switching that was flexible enough to be customizable by app developers.
@@ -210,7 +210,7 @@ And then pass it to the middleware:
```ruby
config.active_record.database_selector = { delay: 2.seconds }
config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
-config.active_record.database_resolver_context = MyCookieResovler
+config.active_record.database_resolver_context = MyCookieResolver
```
## Using manual connection switching
@@ -247,13 +247,13 @@ The `database` argument for `connected_to` will take a symbol or a config hash.
Note that `connected_to` with a role will look up an existing connection and switch
using the connection specification name. This means that if you pass an unknown role
-like `connected_to(role: :nonexistent)` you will get an error like that says
+like `connected_to(role: :nonexistent)` you will get an error that says
`ActiveRecord::ConnectionNotEstablished (No connection pool with 'AnimalsBase' found
for the 'nonexistent' role.)`
## Caveats
-As noted at the top Rails doesn't (yet) support sharding. We had to do a lot of work
+As noted at the top, Rails doesn't (yet) support sharding. We had to do a lot of work
to support multiple databases for Rails 6.0. The lack of support for sharding isn't
an oversight, but does require additional work that didn't make it in for 6.0. For now
if you need sharding it may be advisable to continue using one of the many gems