title: Rails 4 Turbo-links Coffee script not loading
body: <p>This does not seem to load on my sidebar.  I think it has something to do with Turbolinks in rails 4 since if I reload the page, it seems to work.  Any idea on how to change this to get it working?</p>
  
  <pre><code>jQuery -&gt;
    category = $('#subject_category').html()
    $('#subject_product').change -&gt;
      product = $('#subject_product :selected').text()
      escaped_product = product.replace(/([ #;&amp;,.+*~\':"!^$[\]()=&gt;|\/@])/g, '\\$1')
      options = $(category).filter("optgroup[label='#{escaped_product}']").html()
      if options
        $('#subject_category').html(options)
        $('#subject_category').parent().show()
      else
        $('#subject_category').empty()
        $('#subject_category').parent().hide()
  
  $ -&gt;
    category = $('#sidebar .category_select').html()   
    options = $(category).filter("optgroup[label='Car']").html()
    if options
      $('#sidebar .category_select').html(options)
      $('#sidebar .category_select').parent().show()
    else
      $('#sidebar .category_select').empty()
      $('#sidebar .category_select').parent().hide()
  </code></pre>