visionmedia/express-resource — pull request #46 by hunterloftis (2012-01-03 06:27:21+00:00)
Title: custom mapping with strings (includes middleware commits)

A 1-line addition (+tests) for:

```javascript
server.resource('sessions', controllers.session)
.map('all', '/login', 'new')
.map('all', '/logout', 'destroy');
```

**Is this a bug?**
While testing this I noticed that if any resource has a 'show' method custom routes won't work on it, since 'show' will be defined before the custom routes and so the custom mapping will be interpreted as an ID. The fix sounds simple - mount custom routes ahead of default routes - but since I don't really know the inner workings of express I don't want to jump into that right now.