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

Don't wrap a class that behaves as an array inside another array

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:

      Description

      Seeing an issue where attempting an autosave on a has_many fails because relation is a Mongoid::Relations::Targets::Enumerable. When array attempts to wrap this, it results in a nested array rather than a single array as expected. Adding a check for kind_of? Array avoids wrapping a deep class that already behaves as an array.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kayakyakr Charles DuBose
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: