We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57d82b4 commit 0b1a6d7Copy full SHA for 0b1a6d7
guides/source/active_record_multiple_databases.md
@@ -428,12 +428,14 @@ Models are then connected with the `connects_to` API via the `shards` key:
428
429
```ruby
430
class ApplicationRecord < ActiveRecord::Base
431
- self.abstract_class = true
+ primary_abstract_class
432
433
connects_to database: { writing: :primary, reading: :primary_replica }
434
end
435
436
class ShardRecord < ApplicationRecord
437
+ self.abstract_class = true
438
+
439
connects_to shards: {
440
shard_one: { writing: :primary_shard_one, reading: :primary_shard_one_replica }
441
shard_two: { writing: :primary_shard_two, reading: :primary_shard_two_replica }
0 commit comments