<commit_before>Template._bets.helpers({
  openBets: function(){
    return Bets.find({ $and:
      [ { status: "open" },
        { bettors: Session.get( "user" ) }
    ]});
  },
  pendingBets: function(){
    return Bets.find({ $and:
      [ { status: "pending" },
        { bettors: Session.get( "user" ) }
    ]});
  },
  completedBets: function(){
    return Bets.find({ $and:
      [ { status: "completed" },
        { bettors: Session.get( "user" ) }
    ]});
  }
});

Template._bets.events({
  "click .open" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "open" );
  },

  "click .pending" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "pending" );
  },

  "click .completed" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "completed" );
  }
});<commit_msg>Dashboard: store userobject in session when page is rendered<commit_after>Template._bets.helpers({
  openBets: function(){
    return Bets.find({ $and:
      [ { status: "open" },
        { bettors: Session.get( "user" ) }
    ]});
  },
  pendingBets: function(){
    return Bets.find({ $and:
      [ { status: "pending" },
        { bettors: Session.get( "user" ) }
    ]});
  },
  completedBets: function(){
    return Bets.find({ $and:
      [ { status: "completed" },
        { bettors: Session.get( "user" ) }
    ]});
  }
});

Template.dashboard.rendered =function() {
    Session.set("userObject", this.data)  };

Template._bets.events({
  "click .open" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "open" );
  },

  "click .pending" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "pending" );
  },

  "click .completed" : function(){
    Session.set( "user", Meteor.user().username );
    Session.set( "status", "completed" );
  }
});
{'fraction_non_alphanumeric': 0.20693222969477496, 'fraction_numerical': 0.0, 'mean_word_length': 2.8602794411177643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2957023', 'n_tokens_mistral': 675, 'n_tokens_neox': 661, 'n_words': 130}