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

Mongoid 3.1.6 presence: true on embeds_many relation

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.0.2
    • None
    • None

    Description

      When embeds_many :items
      When accept_nested_attributes :items, allow_destroy: true
      When validates_presence_of :items

      When we passed attributes to update_attributes {:items_attributes => [

      {'_id' => someting_id, :_destroy => true}

      ]} (and it is the only one element in relation), validation fails, but document removed from relation.

      Attachments

        Issue Links

          Activity

            People

              dianna.hohensee@mongodb.com Dianna Hohensee
              mayatskiy mayatskiy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: