title: Turbolinks not ignoring page in Rails app
body: <p><strong>The front page view ('Welcome/index.html.erb') :</strong> <a href="https://github.com/bfbachmann/Blog/blob/master/app/views/welcome/index.html.erb" rel="nofollow">https://github.com/bfbachmann/Blog/blob/master/app/views/welcome/index.html.erb</a></p>
  
  <p><strong>Rails Version:</strong> 4.2.6</p>
  
  <p><strong>The overarching problem:</strong></p>
  
  <p>I am trying to get my THREE.js model to show up properly inside my rails app. Everything works fine when I load the page by typing its URL into the search bar in my browser or if I hit reload or 'command' + R (on Windows its 'ctrl' + 'R') on my keyboard. I have a feeling this is because Turbolinks is not fired when these actions are performed. This leaves my model in the state it should be in as shown below.</p>
  
  <p>HOWEVER... when I click one of the links in the navbar (blog, projects, about etc.) and then return to the home page by clicking the house icon either the rotation speed of the model doubles, or the model is duplicated. If the model is duplicated one copy stands still while the other rotates at its regular speed as shown below.</p>
  
  <p><a href="http://i.stack.imgur.com/aZrYb.png" rel="nofollow">Broken Version Screenshot</a></p>
  
  <p><strong>What I've Tried</strong></p>
  
  <p>I have a strong feeling Turbolinks is to blame for this. So I tried to get Turbolinks to ignore that page by adding 'data-no-turbolink' to the body of that page... it didn't work. In fact I think Turbolinks was not even ignoring the page because it still loaded much faster when I clicked the home page link than when I re-entered the page's URL.</p>
  
  <p>I tried adding a callback that would stop all the javascript responsible for the front page from running when the user navigates away from the page. This can be found in the view I linked at the top. I know this callback gets fired because I tested it. That also doesn't solve the problem.</p>
  
  <p>Finally, I should also mention that I am using the JQuery-Turbolinks gem to resolve conflicts between the two.</p>
  
  <p>Any help would be much appreciated. I have been trying to solve this problem for weeks.</p>
  
  <p><strong>Edit:</strong> I forgot to mention that I have read that Turbolinks has problems with inline javascript... this could be causing that problem.</p>
  
  <p><strong>Edit:</strong> It appears my javascript is being run every time I load ANY page on my site even though it is inline javascript. I can't understand why.</p>