Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
None
Description
The two problems are both in https://docs.mongodb.org/ecosystem/tutorial/mongoid-documents/
1,The documentation defines a class not used while uses another class which
is not defined.
Defined this:
class Profile
include Mongoid::Document
field :location, type: Point
end
Use this:
venue = Venue.new(location: point) #=> This uses the mongoize instance method.
venue = Venue.new(location: [ 12, 24 ]) #=> This uses the mongoize class method.
2,A word "Note" is spelled incorrectly as "Not":
"Not that when accessing custom fields from the document, you will get a new instance of that object with each call to the getter. "