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

NoMethodError: undefined method `push' for #<BSON::OrderedHash:0x007ff3be6ed1d8>

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

      When saving a document that has has an embeds_one document nested inside of another embeds_one document I am getting the following error: NoMethodError: undefined method `push' for #<BSON::OrderedHash:0x007ff3be6ed1d8>.

      Line Fault is /lib/mongoid/atomic/modifiers.rb:122

      For now my workaround to the issue is to extend Hash with the following method:

      def push(arr)
      raise "Invalid argument size - size should equal 2" if arr.size != 2
      self[arr[0]] = arr[1]
      end

            Assignee:
            Unassigned Unassigned
            Reporter:
            jhoffner Jake Hoffner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: