emk/sinatra-url-for — pull request #4 by umjames (2011-11-24 21:18:12+00:00)
Title: Added support for URLs with placeholder arguments

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.