visionmedia / express-resource

Resourceful routing for Express
1.41k stars 140 forks source link

Bugfix: no route order was specified, so /name/:id was taking precedence over /name/new #21

Closed danielbeardsley closed 13 years ago

danielbeardsley commented 13 years ago

When defining the routes, the order depended on the order of keys in an object.

Sometimes this meant that the /resource_name/:id route was ahead of /resource_name/new which ensured that when visiting /resource_name/new the request would get mapped to the "show" action with an :id param of 'new'.

I simply defined the order of routes.

seanabrahams commented 13 years ago

Bump.

tj commented 13 years ago

ah didnt see this, thanks