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:
commit
c4c6e2a73d
1 changed files with 2 additions and 2 deletions
|
@ -225,8 +225,8 @@ end
|
||||||
Route patterns may have optional parameters:
|
Route patterns may have optional parameters:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
get '/posts.?:format?' do
|
get '/post/:format?' do
|
||||||
# matches "GET /posts" and any extension "GET /posts.json", "GET /posts.xml" etc.
|
# matches "GET /post/" and any extension "GET /posts/json", "GET /posts/xml" etc
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue