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

3ea74eddb introduces unwanted (for me) behavior to x.changes

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.3.2
    • Affects Version/s: None
    • Component/s: None

      Hi, the changes in commit 3ea74eddb make this fail

        def changed_exposed_fields
          self.changes.keys
              .each_with_object({}){|key, hash|
                                    hash[key] = self.changes[key][1] if
                                    self.class::EXPOSED_FIELDS.include?(key.to_sym) }
        end
      

      with

      Exception encountered: #<NoMethodError: You have a nil object when you didn't expect it!
      You might have expected an instance of Array.
      The error occurred while evaluating nil.[]>

      in the line with self.changes[key][1].
      From reading the commit diff I can't really tell why. Do you have a clue?

      --Frank

            Assignee:
            Unassigned Unassigned
            Reporter:
            fwoeck fwoeck
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: