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

Added optional parameter info to the README

This commit is contained in:
Alessandro Dal Grande 2011-07-27 14:05:29 +02:00
parent 5b9d3dae7e
commit f5b1de9b1d

View file

@ -98,6 +98,12 @@ Or with a block parameter:
"Hello, #{c}!"
end
Route patterns may have optional parameters:
get '/posts.?:format?' do
# matches "GET /posts" and any extension "GET /posts.json", "GET /posts.xml" etc.
end
=== Conditions
Routes may include a variety of matching conditions, such as the user agent: