Hi, I feel like I understand the concept of pub/sub’s roles when removing insecure and autopublish packages but I am having difficulty keeping the data in the database. It appears that the information is sent to be inserted but rejected.
Having removed insecure and autopublish, you make sure:
No data is published to the client (autopublish)
You cannot directly insert from the client unless allowed by allow/deny rules (insecure)
Since you already allow through your allow rules, you are actually populating your database with your insert statements. I don’t know what Factory.create() does and assume it does a proper insert.
The reason you are not able to see them, if that is the case, is that you are not publishing that data from your database on the server to the client.
For that, you need to set up proper publish and subscribe methods.
Something like this would help you get started:
if (Meteor.isServer) {
Meteor.publish('allNetworks', function(){
return Networks.find();
});
}
if (Meteor.isClient) {
Meteor.subscribe('allNetworks');
}
Thank you. It turned out that I had settings in my controller that should have been in my iron-router route. Thanks for the reply though, you pointed me in the right direction once I got around the router issue.