Skip to content

Commit 229673a

Browse files
p-mongop
andauthored
Fix various documentation problems flagged by sphinx (#4871)
Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent f14d82b commit 229673a

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

source/tutorials/getting-started-rails.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ migrating from ActiveRecord to Mongoid.
480480
ActiveRecord models derive from ``ApplicationRecord`` and do not have
481481
column definitions. Mongoid models generally have no superclass but must
482482
include ``Mongoid::Document``, and usually define the fields explicitly
483-
(but with `Dynamic Fields`_ may be used instead of explicit field definition).
483+
(but :ref:`dynamic fields <dynamic-fields>` may also be used instead of
484+
explicit field definitions).
484485

485486
For example, a barebones Post model may look like this in ActiveRecord:
486487

source/tutorials/mongoid-configuration.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ Puma
598598

599599
Use the ``on_worker_boot`` hook to reconnect clients in the workers and
600600
the ``before_fork`` hook to close clients in the parent process
601-
(`Puma documentation <<https://puma.io/puma/>`_):
601+
(`Puma documentation <https://puma.io/puma/>`_):
602602

603603
.. code-block:: ruby
604604

@@ -684,9 +684,9 @@ In development, some settings can be adjusted to provide a better developer
684684
experience.
685685

686686
- ``:server_selection_timeout``: set this to a low value (e.g., ``1``)
687-
if your MongoDB server is running locally and you start it manually. A low
688-
server selection timeout will cause the driver to fail quickly when there is
689-
no server running.
687+
if your MongoDB server is running locally and you start it manually. A low
688+
server selection timeout will cause the driver to fail quickly when there is
689+
no server running.
690690

691691
Sample recommended development configuration:
692692

source/tutorials/mongoid-documents.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,8 @@ to encode symbol values as strings, include the following code snippet in your p
745745
end
746746

747747

748+
.. _dynamic-fields:
749+
748750
Dynamic Fields
749751
==============
750752

source/tutorials/mongoid-relations.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ The following examle illustrates the difference between ``exists?`` and
182182
``any?``:
183183

184184
.. code-block:: ruby
185+
185186
band = Band.create!
186187
# Member is not persisted.
187188
band.members.build
@@ -384,7 +385,7 @@ Thanks to MongoDB's document model, Mongoid also offers embedded associations
384385
which allow documents of different types to be stored hierarchically
385386
in the same collection. Embedded associations are defined using
386387
``embeds_one``, ``embeds_many`` and ``embedded_in`` macros, plus
387-
``recursively_embeds_one`` and ``recursively_embeds_many``for recursive
388+
``recursively_embeds_one`` and ``recursively_embeds_many`` for recursive
388389
embedding.
389390

390391
Embeds One

source/tutorials/sharding.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ be specified:
6969
place of a field name, in which case Mongoid will use the foreign key
7070
configured in the association as the field name:
7171

72+
.. code-block:: ruby
73+
7274
class Person
7375
include Mongoid::Document
7476

0 commit comments

Comments
 (0)