1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Merge pull request #1025 from JonRowe/patch-1

Update README to flag issue with optional routes.
This commit is contained in:
Zachary Scott 2016-01-24 20:27:26 +09:00
commit c4c6e2a73d

View file

@ -225,8 +225,8 @@ end
Route patterns may have optional parameters:
```ruby
get '/posts.?:format?' do
# matches "GET /posts" and any extension "GET /posts.json", "GET /posts.xml" etc.
get '/post/:format?' do
# matches "GET /post/" and any extension "GET /posts/json", "GET /posts/xml" etc
end
```