I am trying to initialize a Route\'s model with a DS query, as follows
App.Router.map(function() {
this.resource(\'post\', { path: \'/posts/:post_slug\'
That should do that trick:
App.Router.map(function() {
this.resource('posts');
this.resource('post', { path: '/posts/:post_id' });
});
App.PostsRoute = Ember.Route.extend({
model: function() {
return App.Post.find();
}
});
App.PostRoute = Ember.Route.extend({
model: function(params) {
return App.Post.find(params.post_id);
}
});