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

Mongoid 3.1.6 presence: true on embeds_many relation

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.2
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

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

              Created:
              Updated:
              Resolved: