Sha256: 18c83775a04b325d6545cc3d69d2c6128b0e8ea1c97c36a4f833eb588ef4dd2c
Contents?: true
Size: 433 Bytes
Versions: 33
Compression:
Stored size: 433 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc: module Extensions #:nodoc: module Array #:nodoc: module Accessors #:nodoc: # If the attributes already exists in the array then they will be # updated, otherwise they will be appended. def update(attributes) delete_if { |e| attributes[:_id] && (e[:_id] == attributes[:_id]) } self.<< attributes end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems