You can identify fairly complex URLs from your Ember router.
App.Router.map(function() {
this.resource('posts', function() {
this.route('new');
});
this.resource('post', { path: '/posts/:post_id' }, function() {
this.resource('comments', function() {
this.route('new');
});
this.route('comment', { path: 'comments/:comment_id'});
});
});
This gives us:
/posts
/posts/new
/posts/:post_id
/posts/:posts_id/comments
/posts/:posts_id/comments/new
/posts/:posts_id/comments/:comment_id
Ember decides whether to use GET, POST, PUT, or DELETE depending on whether it is retrieved from the server, whether a new resource is saved, an existing resource is updated, or deleted.
, , , .