mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
12e6b09943
closes #2414 - Add PostsController with loadNextPage action - Collect and store pagination info from PostsRoute into PostsController - Use `store.filter` on PostsRoute model hook to auto-update posts list template as post models are added to the store - Add content list view and use it to check for scroll event - Make PostRoute only load a post that's already in the store, until we figure how to load multiple pages on refresh - Add util function from clientold that concats error messages from server response
11 lines
249 B
JavaScript
11 lines
249 B
JavaScript
export default Ember.Route.extend({
|
|
model: function (params) {
|
|
var post = this.modelFor('posts').findBy('id', params.post_id);
|
|
|
|
if (!post) {
|
|
this.transitionTo('posts.index');
|
|
}
|
|
|
|
return post;
|
|
}
|
|
});
|