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

#remove_attribute doesn't remove attribute

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None

      Description

      If I #remove_attribute, I expect that attribute to be gone. Its value should not be nil; rather, the key should be removed. What I am seeing is that the value is simply set to nil, rather than the key being removed.

      In particular, this issue relates to models with a #field for that particular key. Rather, the key is set, get, or removed via #read_attribute, #write_attribute, and #remove_attribute.

      Here is a failing spec that illustrates the issue.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: