11***********
2- Mongoid 7.5
2+ Mongoid 8.0
33***********
44
55.. default-domain:: mongodb
@@ -10,7 +10,7 @@ Mongoid 7.5
1010 :depth: 2
1111 :class: singlecol
1212
13- This page describes significant changes and improvements in Mongoid 7.5 .
13+ This page describes significant changes and improvements in Mongoid 8.0 .
1414The complete list of releases is available `on GitHub
1515<https://github.com/mongodb/mongoid/releases>`_ and `in JIRA
1616<https://jira.mongodb.org/projects/MONGOID?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page>`_;
@@ -22,7 +22,7 @@ Default Option Values Changed
2222-----------------------------
2323
2424**Breaking change:** The following options have had their default values
25- changed in Mongoid 7.5 :
25+ changed in Mongoid 8.0 :
2626
2727- ``:broken_aggregables`` => ``false``
2828- ``:broken_alias_handling`` => ``false``
@@ -42,13 +42,13 @@ the description and effects of each of these options.
4242Order of Callback Invocation
4343----------------------------
4444
45- **Breaking change:** Mongoid 7.5 changes the order of _create and _save callback
45+ **Breaking change:** Mongoid 8.0 changes the order of _create and _save callback
4646invocation for documents with associations.
4747
4848Referenced associations (``has_one`` and ``has_many``):
4949
5050+---------------------------------------+---------------------------------------+
51- | Mongoid 7.5 | Mongoid 7.4 |
51+ | Mongoid 8.0 | Mongoid 7 |
5252+=======================================+=======================================+
5353| Parent :before_save | Parent :before_save |
5454+---------------------------------------+---------------------------------------+
@@ -94,7 +94,7 @@ Referenced associations (``has_one`` and ``has_many``):
9494Embedded associations (``embeds_one`` and ``embeds_many``):
9595
9696+---------------------------------------+---------------------------------------+
97- | Mongoid 7.5 | Mongoid 7.4 |
97+ | Mongoid 8.0 | Mongoid 7 |
9898+=======================================+=======================================+
9999| Parent :before_save | Child :before_save |
100100+---------------------------------------+---------------------------------------+
@@ -150,7 +150,7 @@ conditions were provided, and the criteria already had an ``$or`` operator,
150150the new conditions would be added to the existing ``$or`` as an additional
151151branch.
152152
153- Mongoid 7.5 behavior:
153+ Mongoid 8.0 behavior:
154154
155155.. code-block:: ruby
156156
@@ -172,7 +172,7 @@ Mongoid 7.5 behavior:
172172 # class: Band
173173 # embedded: false>
174174
175- Mongoid 7.4 behavior:
175+ Mongoid 7 behavior:
176176
177177.. code-block:: ruby
178178
@@ -218,20 +218,20 @@ in ``after_*`` callbacks. This follows ActiveRecord/ActiveModel behavior.
218218 a.age = 2
219219 a.save!
220220
221- Mongoid 7.5 output:
221+ Mongoid 8.0 output:
222222
223223.. code-block:: ruby
224224
225225 #<Cat _id: 60aef1652c97a617438dc9bb, age: 2>
226226 2
227227
228228
229- Mongoid 7.4 output:
229+ Mongoid 7 output:
230230
231231.. code-block:: ruby
232232
233233 #<Cat _id: 60aef1652c97a617438dc9bb, age: 2>
234234 nil
235235
236- Notice that in 7.4 ``attribute_was(:age)`` returns the old attribute value,
237- while in 7.5 ``attribute_was(:age)`` returns the new value.
236+ Notice that in 7 ``attribute_was(:age)`` returns the old attribute value,
237+ while in 8.0 ``attribute_was(:age)`` returns the new value.
0 commit comments