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

Add mark_for_destruction and marked_for_destruction? methods

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: Associations, Persistence
    • None
    • None
    • Ruby Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Rails provides mark_for_destruction method that marks a child to be destroyed as part of the parent's save operation. Normally changes on an association like adding or removing members are persisted immediately. This method allows to postpone persistence, which might be helpful in some cases.

      There is also a paired method marked_for_destruction? that should be implemented as well.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None