Skip to content

Instantly share code, notes, and snippets.

@vanstee
Last active December 20, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanstee/6118032 to your computer and use it in GitHub Desktop.
Save vanstee/6118032 to your computer and use it in GitHub Desktop.
// Non-nested resources
App.Router.map(function() {
this.resource('users', function() {
this.route('index');
this.route('new');
});
// The documentation uses /user/:id for these signular resources which
// seems wrong if we want to keep them RESTful (at least like rails).
this.resource('user', { path: 'users/:user_id' }, function() {
this.route('index');
this.route('edit');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment