visionmedia/express-resource — Issue #39: custom collection actions
Author: icambron
Created: 2011-11-30 23:02:22+00:00
State: open

Suppose I've done something like:

```javascript
var users = {

show: function(req, res){
//do something
},

me: function(req, res){
//do something
},

load : function(id, fn){
User.findById(id, fn);
}
};

var userResource = app.resource('users', users);
userResource.map('get', 'me', users.me) //expecting /users/me to do something
```

That doesn't work. It seems to think that "me" is the ID and passes it to `load`, thinking it's going to invoke `show`. So I'm thinking custom actions anchored to the collection don't work; you can only do custom member actions.

So first off, is that right? If so, is this something I should patch?