From 5e7b4ba416528c9c70ba3df4509c1fb7ef18d800 Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Wed, 24 Aug 2011 23:15:17 +0200 Subject: [PATCH] Fix some TUTORIAL markdown. * Escape _ for bson_ext. * Fix insert example. * Un-escape _id, not required with backtick quotes. Signed-off-by: Laurent Arnoud --- docs/TUTORIAL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/TUTORIAL.md b/docs/TUTORIAL.md index 2d7051c..a589e2b 100644 --- a/docs/TUTORIAL.md +++ b/docs/TUTORIAL.md @@ -15,7 +15,7 @@ Next, install the mongo rubygem: The required `bson` gem will be installed automatically. -For optimum performance, install the bson_ext gem: +For optimum performance, install the bson\_ext gem: gem install bson_ext @@ -98,7 +98,7 @@ Once you have the collection object, you can insert documents into the collectio Notice that the above has an "inner" document embedded within it. To do this, we can use a Hash or the driver's OrderedHash (which preserves key order) to create the document (including the inner document), and then just simply insert it into the collection using the `insert()` method. doc = {"name" => "MongoDB", "type" => "database", "count" => 1, - "info" => {"x" => 203, "y" => '102'` + "info" => {"x" => 203, "y" => '102'}} coll.insert(doc) #### Updating a Document @@ -126,7 +126,7 @@ and you should see: {"_id"=>#, "name"=>"MongoDB", "info"=>{"x"=>203, "y"=>102}, "type"=>"database", "count"=>1} -Note the `\_id` element has been added automatically by MongoDB to your document. +Note the `_id` element has been added automatically by MongoDB to your document. #### Adding Multiple Documents