Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 336f955

Browse files
committedMay 28, 2014
updated README
1 parent e6e4bcb commit 336f955

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎Readme.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ In your main application file (i.e. app.js or server.js) just add the following:
6060

6161
Lastly just call `app.resource()` with your controller name. Nesting is done by passing a function that can call `app.resource()` for each nested resource. Options can also be passed as the second parameter which override the options set in the controller itself.
6262

63-
app.resource('articles', { version : 'v1'} function() {
64-
app.resource('comments', { version : 'v1', id: 'id' }); // You can also call `this.resource('comments')`
63+
app.resource('articles', { controller : articles }, function() {
64+
app.resource('comments', { controller : comments });
6565
});
6666

6767
You can also create non-standard RESTful routes.
@@ -84,8 +84,8 @@ You can also create non-standard RESTful routes.
8484
`./app.js`:
8585

8686
/* ... */
87-
app.resource('articles', function() {
88-
this.resource('comments', function() {
87+
app.resource('articles', { controller : articles }, function() {
88+
this.resource('comments', { controller : comments }, function() {
8989
this.collection.get('search');
9090
this.member.get('reply');
9191
});

0 commit comments

Comments
 (0)
Please sign in to comment.