Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Add docs for jsonp and pluralize controllers config options.
Browse files Browse the repository at this point in the history
  • Loading branch information
xdissent committed Sep 16, 2013
1 parent 9cad244 commit f02af92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.controllers.md
Expand Up @@ -13,3 +13,7 @@ These CRUD shortcuts exist for your convenience during development, but you'll w
Automatic REST blueprints enabled? e.g. `'get /:controller/:id?'` `'post /:controller'` `'put /:controller/:id'` `'delete /:controller/:id'` Automatic REST blueprints enabled? e.g. `'get /:controller/:id?'` `'post /:controller'` `'put /:controller/:id'` `'delete /:controller/:id'`
####`expectIntegerId` (boolean) ####`expectIntegerId` (boolean)
If a blueprint route catches a request, only match :id param if it's an integer. e.g. only trigger route handler if requests look like: `get /user/8` instead of: `get /user/a8j4g9jsd9ga4ghjasdha`. You’ll usually want to change this to `false` when using a database that uses strings for unique IDs, such as Mongo. If a blueprint route catches a request, only match :id param if it's an integer. e.g. only trigger route handler if requests look like: `get /user/8` instead of: `get /user/a8j4g9jsd9ga4ghjasdha`. You’ll usually want to change this to `false` when using a database that uses strings for unique IDs, such as Mongo.
####`jsonp` (boolean)
Optionally wrap blueprint JSON responses in a JSONP callback using `res.jsonp()` from Express 3. (default: `false`)
####`pluralize` (boolean)
Optionally use plural controller names in blueprint routes, e.g. `/users` for `api/controllers/UserController.js`. (default: `false`)

0 comments on commit f02af92

Please sign in to comment.