Skip to content

Commit

Permalink
Merge 60415f9 into b786709
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-bradshaw committed Feb 13, 2014
2 parents b786709 + 60415f9 commit d6c8b4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ request_parameter | version that is sent in the body of the request | Good for t
:http_accept_parameter | HTTP Accept header | `Accept: application/xml; version=1` [why do this?](http://blog.steveklabnik.com/posts/2011-07-03-nobody-understands-rest-or-http#i_want_my_api_to_be_versioned)
custom | takes the request object and must return an integer | lambda {|request| request.headers["HTTP_X_MY_VERSION"].to_i }

If you use the path_parameter strategy with resources routes, you will want to setup your routes like this:
```
resources :cakes, path: '/api/v:api_version/cakes'
```

#### Default Version

Expand Down

0 comments on commit d6c8b4b

Please sign in to comment.