8080
8181## Mounting
8282
83- The above exmaple would create a Rack application that could be used like so (in a Rackup
84- * config.ru* file):
83+ The above sample creates a Rack application that can be run from a Rackup * config.ru* file:
8584
8685``` ruby
8786run Twitter ::API
@@ -93,7 +92,7 @@ And would respond to the following routes:
9392 GET /statuses/show/:id(.json)
9493 POST /statuses/update(.json)
9594
96- Modify * config/routes * to mount Grape in a Rails 3 application.
95+ In a Rails application, modify * config/routes * :
9796
9897``` ruby
9998mount Twitter ::API => " /"
@@ -109,7 +108,7 @@ request:
109108 curl -H Accept=application/vnd.twitter-v1+json http://localhost:9292/statuses/public_timeline
110109
111110By default, the first matching version is used when no Accept header is
112- supplied. This behavior is similar to routing in Rails. To circumvent this default behaviour ,
111+ supplied. This behavior is similar to routing in Rails. To circumvent this default behavior ,
113112one could use the ` :strict ` option. When this option is set to ` true ` , a ` 404 Not found ` error
114113is returned when no correct Accept header is supplied.
115114
@@ -342,7 +341,7 @@ This will match all paths starting with '/urls/'. There is one caveat though:
342341the ` params[:url] ` parameter only holds the first part of the request url.
343342Luckily this can be circumvented by using the described above syntax for path
344343specification and using the ` PATH_INFO ` Rack environment variable, using
345- ` env["PATH_INFO"] ` . This will hold everyting that comes after the '/urls/'
344+ ` env["PATH_INFO"] ` . This will hold everything that comes after the '/urls/'
346345part.
347346
348347## Note on Patches/Pull Requests
0 commit comments