Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-7745

Two problems in "tutorial/mongoid-documents.txt"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 01112017-cleanup
    • 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. "

      Attachments

        Activity

          People

            emily.stolfo Emily Stolfo
            liukgg liukun
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 29 weeks ago