lib/custom_fields/source.rb in custom_fields-2.4.0.rc8 vs lib/custom_fields/source.rb in custom_fields-2.5.0.rc1

- old
+ new

@@ -178,11 +178,11 @@ _fields = operations.delete("$#{operation_name}") next if _fields.empty? _operation = { "$#{operation_name}" => _fields } - collection.find(selector).update _operation, multi: true + collection.find(selector).update_many _operation end end # If the localized attribute has been changed in at least one of the custom fields, # we have to upgrade all the records enhanced by custom_fields in order to make @@ -212,10 +212,10 @@ end next if updates.empty? collection = self.send(name).collection - collection.find(record.atomic_selector).update({ '$set' => updates }) + collection.find(record.atomic_selector).update_one({ '$set' => updates }) end end module ClassMethods