Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Added support for URLs with placeholder arguments #4
In Sinatra, you can specify a URL pattern handler such as /object/:id that will match URLs like /object/1 or /object/5.
I added support for this type of URL to be specified in the URL argument to url_for. If url_for's options argument has a key that equals the placeholder, the value associated with that key will be substituted into the url and that argument is removed from the options.
I added 2 rspec examples that show how this works.