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

_type attribute is ignored by default in the serializable_hash method

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Hi, I am referring to the following change, which by default now adds the _type attribute to the except list.
      https://github.com/mongoid/mongoid/commit/70dbda0009b7f7d85ce902d510ac18775f2a81d0#L1R34

      I am just curious about the reason for this change. I suppose I had in mind that when serialization occurs the _type would be useful to have if the output were ever to be deserialized; i.e., particularly in the case of a polymorphic class that is sent to the browser as json.

      But maybe I am thinking about this incorrectly.

      Thanks!
      -Eric

            Assignee:
            Unassigned Unassigned
            Reporter:
            ethul ethul
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: