flatiron / restful

reflect RESTful Director routers from Resourceful resources
237 stars 48 forks source link

options.prefix doesn't appear to work #11

Closed geek closed 12 years ago

geek commented 12 years ago

When trying out

app.use(restful, { prefix: '/api' })

with a resource for user, the URL at /api/users doesn't work. I believe this is due to the controller not properly respecting if a resource was prefixed with a parent path, but I may be wrong about that.

Being able to put all of the endpoints under a common path seems useful. Is there another way in which I should be doing this or is prefix the recommended approach?

Thanks.

Marak commented 12 years ago

Good catch!

option.prefix was actually intended for internal use, but what you ask makes sense.

I'll add this soon. Thanks for the feedback.

pksunkara commented 12 years ago

Fixed.