// listen for changes in firebase
// refresh partial when change occurs

// Current user
var firebaseListen = function (userId) {
  var dataRef = new Firebase('https://crossfithub.firebaseio.com/' + userId);
  dataRef.on('child_added', function(snapshot) {    
    // remove entry from firebase to keep page from reloading infinitely
    dataRef.remove();

    // should render partial instead of reloading entire page

    $.get('http://localhost:3000/completions').done(function( data ) {
      $('#completions').html(data)
    })
    //location.reload();
  });

}

// Followers of current user
// var firebaseNotify = function (userId) {
//   var dataRef = new Firebase('https://crossfithub.firebaseio.com/' + userId);
//   dataRef.on('child_added', function(snapshot) {
//     dataRef.remove();
//   });
// }
// listen for changes in firebase
// refresh partial when change occurs

// Current user
var firebaseListen = function (userId) {
  var dataRef = new Firebase('https://crossfithub.firebaseio.com/' + userId);
  dataRef.on('child_added', function(snapshot) {    
    // remove entry from firebase to keep page from reloading infinitely
    dataRef.remove();

    // should render partial instead of reloading entire page

    $.get('http://crossfithub.herokuapp.com/completions').done(function( data ) {
      $('#completions').html(data)
    })
    //location.reload();
  });

}

// Followers of current user
// var firebaseNotify = function (userId) {
//   var dataRef = new Firebase('https://crossfithub.firebaseio.com/' + userId);
//   dataRef.on('child_added', function(snapshot) {
//     dataRef.remove();
//   });
// }
Change url to point to heroku in firebase_listener
Change url to point to heroku in firebase_listener
