File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,37 @@ as well as ActiveRecord-compatible ``previously_new_record?`` and
272272 user.previously_persisted? # => true
273273
274274
275+ Unknown Field Type Symbols/Strings Prohibited
276+ ---------------------------------------------
277+
278+ Mongoid 8 prohibits using symbols and strings as field types when these symbols
279+ and strings do not map to a known type. Previously such usage would create a
280+ field of type ``Object``.
281+
282+ Mongoid 8 behavior:
283+
284+ .. code-block:: ruby
285+
286+ class User
287+ include Mongoid::Document
288+
289+ field :name, type: :bogus
290+ # => raises Mongoid::Errors::InvalidFieldType
291+ end
292+
293+ Mongoid 7 behavior:
294+
295+ .. code-block:: ruby
296+
297+ class User
298+ include Mongoid::Document
299+
300+ field :name, type: :bogus
301+ # Equivalent to:
302+ field :name
303+ end
304+
305+
275306Removed ``Document#to_a`` method
276307--------------------------------
277308
You can’t perform that action at this time.
0 commit comments