ghempton/ember-routemanager — pull request #6 by rlivsey (2012-03-19 19:11:06+00:00)
Title: Captured groups in RegEx routes are assigned to the params

Javascript doesn't support named capture groups, so instead I've added a 'captures' property which lets you map the matched group to a name for the params.

Eg (from the tests):

Ember.RouteManager.create({
posts: Ember.State.create({
route: 'posts',
archive: Ember.State.create({
route: /(\d{4})-(\d{2})-(\d{2})/,
captures: ['year', 'month', 'day']
})
})
});

If given ``/posts/2012-08-21`` then it will put the matched ``year``, ``month`` and ``day`` into the params.