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

Embedded documents are removed when validation fails

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.10
    • Affects Version/s: None
    • Component/s: None

      I'm having a related problem to the issue described in MONGOID-1326.

      The issue in MONGOID-1326 is fixed but if you are doing this in the context of a rails form you end up with a strange behavior.

      If the validation fails the embedded document is still removed. So when it rerenders the form with the validation errors it won't render the destroyed embedded model. Thus when you submit the form the _destroy doesn't carry over to the next request and the embedded document is ultimately not removed.

            Assignee:
            durran Durran Jordan
            Reporter:
            hadees hadees
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: