Skip to content

Commit 8d72d89

Browse files
MONGOID-5050 Fix various typos in documentation (#5028)
* Fix various typos in documentation * More fixes Co-authored-by: shields <[email protected]>
1 parent c921f86 commit 8d72d89

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

source/ecosystem.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Extension Libraries
3535

3636
- `Mongoid Collection Snapshot <https://github.com/mongoid/mongoid-collection-snapshot>`_
3737

38-
Easy maintenence of collections of processed data in MongoDB with the Mongoid ODM.
38+
Easy maintenance of collections of processed data in MongoDB with the Mongoid ODM.
3939

4040
- `Mongoid Locker <https://github.com/mongoid/mongoid-locker>`_
4141

source/reference/associations.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ documents and does not query the database:
166166
band.members.any?
167167

168168
Note that simply calling ``any?`` would *not* load the association
169-
(since ``any?`` only retrtieves the _id field of the first matching document).
169+
(since ``any?`` only retrieves the _id field of the first matching document).
170170

171171
``exists?``
172172
~~~~~~~~~~~
@@ -180,7 +180,7 @@ any *persisted* documents in the association. Unlike the ``any?`` method:
180180
- ``exists?`` does not allow filtering in the application like ``any?`` does,
181181
and does not take any arguments.
182182

183-
The following examle illustrates the difference between ``exists?`` and
183+
The following example illustrates the difference between ``exists?`` and
184184
``any?``:
185185

186186
.. code-block:: ruby
@@ -919,7 +919,7 @@ is defined:
919919
- ``:foreign_key`` is the field on the local model which stores the
920920
``:primary_key`` values.
921921
- ``:inverse_primary_key`` is the field on the local model that the remote
922-
model uses to look up the local model docuemnts.
922+
model uses to look up the local model documents.
923923
- ``:inverse_foreign_key`` is the field on the remote model storing the
924924
values in ``:inverse_primary_key``.
925925

@@ -1531,7 +1531,7 @@ are supported:
15311531
- `$project <https://docs.mongodb.com/manual/reference/operator/aggregation/project/>`_
15321532
- `$unwind <https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/>`_
15331533

1534-
To construct a pipeline, call the corresponding aggregation pipeine methods
1534+
To construct a pipeline, call the corresponding aggregation pipeline methods
15351535
on a ``Criteria`` instance. Aggregation pipeline operations are added to the
15361536
``pipeline`` attribute of the ``Criteria`` instance. To execute the pipeline,
15371537
pass the ``pipeline`` attribute value to ``Collection#aggragegate`` method.
@@ -1592,7 +1592,7 @@ Alternatively, standard MongoDB aggregation pipeline syntax may be used:
15921592

15931593
.. code-block:: ruby
15941594

1595-
criteria = Tour.all.group(_id: 'states', states: {'$addtoSet' => '$states'})
1595+
criteria = Tour.all.group(_id: 'states', states: {'$addToSet' => '$states'})
15961596

15971597
project
15981598
```````
@@ -1616,7 +1616,7 @@ unwind
16161616
The ``unwind`` method adds an `$unwind aggregation pipeline stage
16171617
<https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/>`_.
16181618

1619-
The argument can be a field name, specifyable as a symbol or a string, or
1619+
The argument can be a field name, specifiable as a symbol or a string, or
16201620
a Hash or a ``BSON::Document`` instance:
16211621

16221622
.. code-block:: ruby

source/reference/configuration.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ When using Mongoid with a forking web server such as Puma, Unicorn or
605605
Passenger, it is recommended to not perform any operations on Mongoid models
606606
in the parent process prior to the fork.
607607

608-
When a process forks, Ruby threads are not transfered to the child processes
608+
When a process forks, Ruby threads are not transferred to the child processes
609609
and the Ruby driver Client objects lose their background monitoring. The
610610
application will typically seem to work just fine until the deployment
611611
state changes (for example due to network errors, a maintenance event) at

source/reference/crud.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ Hash Access
707707
-----------
708708

709709
Mongoid model instances define the ``[]`` and ``[]=`` methods to provide
710-
``Hash`` style acccess to the attributes. ``[]`` is an alias for
710+
``Hash`` style access to the attributes. ``[]`` is an alias for
711711
``read_attribute`` and ``[]=`` is an alias for ``write_attribute``; see
712712
the section on :ref:`read_attribute and write_attribute <read-write-attribute>`
713713
for the detailed description of their behavior.

source/reference/fields.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ or else the values will not store properly.
209209
save
210210
end
211211

212-
# all data will fail to save due to the illegal hashkey
212+
# all data will fail to save due to the illegal hash key
213213
def set_vals_fail
214214
self.first_name = 'Daniel'
215215
self.url = {'home.page' => 'http://www.homepage.com'}
@@ -323,7 +323,7 @@ the :ref:`default Mongoid time zone <time-zones>` is used:
323323
ticket.opened_at
324324
# => Sun, 04 Mar 2018 15:00:00 +0000
325325

326-
If a time zone is specfied, it is respected:
326+
If a time zone is specified, it is respected:
327327

328328
.. code-block:: ruby
329329

@@ -680,7 +680,7 @@ Custom Ids
680680
----------
681681

682682
By default, Mongoid defines the ``_id`` field on documents to contain a
683-
``BSON::ObjcetId`` value which is automatically generated by Mongoid.
683+
``BSON::ObjectId`` value which is automatically generated by Mongoid.
684684

685685
It is possible to replace the ``_id`` field definition to change the type
686686
of the ``_id`` values or have different default values:
@@ -816,7 +816,7 @@ defined, and invoking them raises ``NoMethodError``:
816816
# => "Bob"
817817

818818
Attributes can always be read using mass attribute access or ``read_attribute``
819-
(this appies to models not using dynamic fields as well):
819+
(this applies to models not using dynamic fields as well):
820820

821821
.. code-block:: ruby
822822

source/reference/queries.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ Mongoid provides three merge strategies:
527527
same field, the values of the existing condition are intersected with the
528528
values of the new condition and the result is stored as the operator value.
529529
- **Union**: if there already is a condition using the same operator on the
530-
same field, the values of the new condition are aded to the values of the
531-
exsting condition and the result is stored as the operator value.
530+
same field, the values of the new condition are added to the values of the
531+
existing condition and the result is stored as the operator value.
532532

533533
The following snippet demonstrates all of the strategies, using ``in`` as the
534534
example operator:
@@ -796,7 +796,7 @@ should therefore be avoided.
796796

797797
band = Band.only(:tours, 'tours.year').last
798798

799-
The most recent projection specification overrided the earlier one.
799+
The most recent projection specification overrides the earlier one.
800800
For example, the above query was equivalent to:
801801

802802
.. code-block:: ruby
@@ -1027,8 +1027,8 @@ The Improved Driver Query Cache
10271027
-------------------------------
10281028

10291029
The Mongoid query cache has been reimplemented in version 2.14.0 of the MongoDB
1030-
Ruby Driver. The driver query cache is more correct and more effective, and it
1031-
is recmomended that you upgrade to version 2.14.0 of the Ruby driver or newer.
1030+
Ruby Driver. The driver query cache is more correct and more effective, and we
1031+
recommended that you upgrade to version 2.14.0 of the Ruby driver or newer.
10321032

10331033
For the purposes of this tutorial, the Mongoid query cache will be called "the
10341034
legacy query cache", and the driver query cache will be referred to as "the
@@ -1231,7 +1231,7 @@ Mongoid also has some helpful methods on criteria.
12311231
* - ``Criteria#estimated_count``
12321232

12331233
*Get an approximate number of documents in the collection using the
1234-
collection metadta. The* ``estimated_count`` *method does not accept
1234+
collection metadata. The* ``estimated_count`` *method does not accept
12351235
query conditions; if any are given, it will raise*
12361236
``Mongoid::Errors::InvalidEstimatedCountCriteria``.
12371237
*If a model defines a default scope,* ``estimated_count`` *must be

source/release-notes/mongoid-7.2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ or globally. To set the discriminator key on the parent class:
287287
class Rectangle < Shape
288288
end
289289

290-
To set the discrminator key globally:
290+
To set the discriminator key globally:
291291

292292
.. code-block:: ruby
293293

source/tutorials/getting-started-rails.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Use the ``rails`` command to create the application skeleton, as follows:
6565
in a moment.
6666

6767
We pass ``--skip-active-record`` to request that ActiveRecord is not added
68-
as a dependency, because we will be using Mongoid instead. Additionaly
68+
as a dependency, because we will be using Mongoid instead. Additionally
6969
we pass ``--skip-bundle`` because we'll be modifying the ``Gemfile`` to
7070
add the ``mongoid`` dependency.
7171

@@ -479,7 +479,7 @@ include ``Mongoid::Document``, and usually define the fields explicitly
479479
(but :ref:`dynamic fields <dynamic-fields>` may also be used instead of
480480
explicit field definitions).
481481

482-
For example, a barebones Post model may look like this in ActiveRecord:
482+
For example, a bare-bones Post model may look like this in ActiveRecord:
483483

484484
.. code-block:: ruby
485485
:name: app/models/post.rb

0 commit comments

Comments
 (0)