title: Coffeescript and jQuery not working using Ruby on Rails on a particular view
body: <p>I'm having a javascript issue with Ruby on Rails (4.1.4). It is only with one controller and I can't figure out why- does anyone have any idea? Thank you.   </p>
  
  <pre><code>####This works :)
  $(document).on "turbolinks:load", -&gt;
    $('#redemption_amount').keyup updateWorth
    $('#redemption_amount').change updateWorth
  
   updateWorth = -&gt;
      discount = ($('#discount').val() / 100)
      worth = $(this).val() * discount
      $('#redemption_worth').html(worth.toFixed(2))
  #####
  </code></pre>
  
  <p>Here is the issue: </p>
  
  <pre><code>####This does not work :(
  $(document).on "turbolinks:load", -&gt;
    $('#purchase_amount').keyup updatePoints
    $('#purchase_amount').change updatePoints
  
    updatePoints = -&gt;
          points = (Math.round($(this).val() * 0.92))
          $('#purchase_points').html(points)
  ####
  </code></pre>