diff --git a/lib/mongo/gridfs/chunk.rb b/lib/mongo/gridfs/chunk.rb index a676a42..ca63cc1 100644 --- a/lib/mongo/gridfs/chunk.rb +++ b/lib/mongo/gridfs/chunk.rb @@ -63,7 +63,7 @@ module XGen def save coll = @file.chunk_collection - coll.remove({'_id' => @object_id}) if @object_id + coll.remove({'_id' => @object_id}) coll.insert(to_mongo_object) end