Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5312

Document attributes method in reference

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.1.0
    • Affects Version/s: None
    • Component/s: Docs
    • Labels:
      None

      The reference documentation does not currently explicitly document the #attributes method. There are however several instances of it being used to demonstrate the results of other operations.

      In https://jira.mongodb.org/browse/MONGOID-4397 a special case was added for embedded associations: they are not returned from #attributes when they are an empty array. This could be important and should be part of the documentation in scope of this ticket.

      Documentation should state:

      Whether the return value is a Hash or BSON::Document (indifferently accessible)
      Whether values are stored after mongoization
      Whether embedded associations are included

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: