Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Sep 23, 2011

Conversation

Projects
None yet
3 participants
Contributor

danielbeardsley commented Jun 12, 2011

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.

Bump.

Owner

tj commented Sep 23, 2011

ah didnt see this, thanks

tj added a commit that referenced this pull request Sep 23, 2011

Merge pull request #21 from Wompt/master
Bugfix: no route order was specified, so /name/:id was taking precedence over /name/new

@tj tj merged commit e4e7080 into expressjs:master Sep 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment