Merge branch 'subs-manager' of github.com:arunoda/Telescope into arunoda-subs-manager

Conflicts:
	lib/router.js
This commit is contained in:
Sacha Greif 2014-07-08 15:12:09 +09:00
commit 87378ec656
2 changed files with 12 additions and 12 deletions

View file

@ -358,11 +358,9 @@ PostsDigestController = FastRender.RouteController.extend({
PostPageController = FastRender.RouteController.extend({
waitOn: function() {
return [
coreSubscriptions.subscribe('singlePost', this.params._id),
coreSubscriptions.subscribe('postComments', this.params._id),
coreSubscriptions.subscribe('postUsers', this.params._id)
];
this.postSubscription = coreSubscriptions.subscribe('singlePost', this.params._id);
this.commentSubscription = coreSubscriptions.subscribe('postComments', this.params._id);
this.postUsersSubscription = coreSubscriptions.subscribe('postUsers', this.params._id);
},
post: function() {
@ -370,11 +368,14 @@ PostPageController = FastRender.RouteController.extend({
},
onBeforeAction: function(pause) {
if (this.ready()) {
if (! this.post()) {
if (this.postSubscription.ready()) {
this.render('not_found');
return pause();
}
this.render('loading');
pause();
}
},

View file

@ -181,4 +181,3 @@ Meteor.publish('notifications', function() {
}
return [];
});