File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
source/quick-start-sinatra Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ the sample data, and render retrieved results.
2323
2424.. TODO Learn more about {+odm+} features from the following resources:
2525
26- .. - :ref:`mongoid-fundamentals-connection`: learn how to configure your MongoDB
26+ .. - :ref:`mongoid-fundamentals-connection`: Learn how to configure your MongoDB
2727.. connection.
2828..
29- .. - :ref:`mongoid-usage-examples`: see code examples of frequently used MongoDB
29+ .. - :ref:`mongoid-usage-examples`: See code examples of frequently used MongoDB
3030.. operations.
3131
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ View MongoDB Data
3131
3232 In the ``app.rb`` file, create a model called ``Restaurant``
3333 to represent data from the sample ``restaurants`` collection in
34- your MongoDB database:
34+ the ``sample_restaurants`` database:
3535
3636 .. code-block:: ruby
3737
@@ -46,8 +46,8 @@ View MongoDB Data
4646
4747 .. step:: Generate a view
4848
49- To display your data in a specified way by using HTML, you can
50- create a **view** .
49+ Create a **view** to display your data in a specified way by using
50+ HTML and {+language+} .
5151
5252 At the root level of your project, create a directory
5353 called ``views``. Then, create a file called
@@ -106,8 +106,8 @@ View MongoDB Data
106106 use the ``to_json()`` method to display your results in JSON
107107 format.
108108
109- Replace the ``list_restaurants`` route with the following code to
110- retrieve results and return them as JSON documents:
109+ Replace the ``list_restaurants`` route in the ``app.rb`` file with
110+ the following code to return the results as JSON documents:
111111
112112 .. code-block:: ruby
113113
Original file line number Diff line number Diff line change @@ -28,11 +28,14 @@ Write Data to MongoDB
2828 .. step:: Post a request to create a restaurant entry
2929
3030 Send a ``Restaurant`` instance to the ``add_restaurant`` endpoint
31- by running the following command in your shell:
31+ by running the following command from the application root
32+ directory:
3233
3334 .. code-block:: bash
3435
35- curl -d 'restaurant[name]=Good+Earth+Cafe&restaurant[cuisine]=Cafe&restaurant[borough]=Queens' http://localhost:4567/add_restaurant
36+ curl -d \
37+ 'restaurant[name]=Good+Earth+Cafe&restaurant[cuisine]=Cafe&restaurant[borough]=Queens' \
38+ http://localhost:4567/add_restaurant
3639
3740 .. step:: View the data
3841
You can’t perform that action at this time.
0 commit comments