Cant View ddp data for edit


I have a simple app that will not allow me to see data ddp data when editing. I am able to add without n issue. Here a simple snippet.


Router.route('/editLoyaltyCampaign/:_id', {
name: 'editLoyaltyCampaign',
data: function(){ 
 console.log(LoyaltyInstantReward.findOne({_id: this.params._id})); //returns undefined.
 return LoyaltyInstantReward.findOne({_id: this.params._id});

onBeforeAction: function(){
var currentUser = Meteor.userId();
} else {
  subscriptions: function(){
   return Meteor.subscribe('LoyaltyInstantReward');

LoyaltyInstantReward = new Mongo.Collection('loyaltyinstantreward');

if (Meteor.isServer) {
     Meteor.publish(LoyaltyInstantReward, function () {
     var v = LoyaltyInstantReward.find();
     return v;

var LoyaltyInstantRewardSchema = new SimpleSchema({
   //fields here

LoyaltyInstantReward.attachSchema( LoyaltyInstantRewardSchema );

Any one can tell what I am doing wrong. I am really a newbie to meteor.


You are asking questions without pasting formatted code.


My Bad. I have corrected unformatted code.


Any help. I cant see what I am doing wrong. I have spent a week so far. reading tutorials and code but cannot see what i am doing wrong to be not able to see ddp data, even though I am seeing a list using aldeed tabular. when i click on one of the items to view details it does not show.


I found the answer here: