Skip to content
Browse files

Added optional parameter info to the README

  • Loading branch information...
1 parent 25040ab commit 495d5e580abf6e20b6537429b0b132962155b932 @aledalgrande aledalgrande committed with rkh Jul 27, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.rdoc
View
6 README.rdoc
@@ -97,6 +97,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:

0 comments on commit 495d5e5

Please sign in to comment.
Something went wrong with that request. Please try again.