Skip to content

Instantly share code, notes, and snippets.

@lorecrafting
Created December 12, 2014 01:18
Show Gist options
  • Save lorecrafting/a172e95ba5be9b416bea to your computer and use it in GitHub Desktop.
Save lorecrafting/a172e95ba5be9b416bea to your computer and use it in GitHub Desktop.
'click #confirm': function() {
var selectedLine = Session.get('lineSelect');
if (selectedLine === 'line2') {
Session.set('selectedDragon', "Metal Dragon")
Session.set('leftUiStage', 2)
Session.set('rightUiStage', 2)
Meteor.users.update(Meteor.userId(),{$set: {profile: Dragons.find({_id: "Yn96cfK5MGPKZTKTN"}).fetch()[0]}})
//If I put the Meteror.users.update... line before the session.sets, the helper will update the database, but it won't set the sessions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment