lib/collector/repository.rb in collector-0.0.17 vs lib/collector/repository.rb in collector-0.0.18
- old
+ new
@@ -28,10 +28,10 @@
save_without_updating_timestamps(model)
end
def save_without_updating_timestamps(model)
attributes = serialize!(model)
- collection.insert(attributes)
+ collection.save(attributes)
end
def serialize!(model)
attributes = serialize(model)
attributes["_id"] = BSON::ObjectId.from_string(attributes.delete("id")) if attributes["id"]