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

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

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

      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.

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

              Created:
              Updated:
              Resolved: