preload pages subscription; get rid of global subscriptions fastRender code since that's done automatically

This commit is contained in:
Sacha Greif 2015-07-08 15:37:55 +09:00
parent dda6faecb8
commit 3142da417b
3 changed files with 2 additions and 15 deletions

View file

@ -19,18 +19,6 @@ Router.configure({
}
});
// adding common subscriptions that's need to be loaded on all the routes
// notification does not included here since it is not much critical and
// it might have considerable amount of docs
if(Meteor.isServer) {
FastRender.onAllRoutes(function() {
var router = this;
_.each(Telescope.subscriptions, function(sub){
router.subscribe(sub);
});
});
}
Telescope.controllers = {};
Telescope.subsManager = new SubsManager({

View file

@ -4,8 +4,6 @@ Telescope.menuItems.add("adminMenu", {
description: 'manage_static_pages'
});
Telescope.subscriptions.preload('pages');
var PageController = RouteController.extend({
currentPage: function () {
return Pages.findOne({slug: this.params.slug});

View file

@ -1,5 +1,7 @@
Pages = new Mongo.Collection('pages');
Telescope.subscriptions.preload('pages');
Pages.schema = new SimpleSchema({
title: {
type: String
@ -20,7 +22,6 @@ Pages.schema = new SimpleSchema({
}
});
Pages.schema.internationalize();
Pages.attachSchema(Pages.schema);