title: refresh Rails view data based on select_tag value
body: <p>I have a Rails view(mycontroller/index) with select_tag control.</p>
  
  <p>I want to refresh it based on select_tag value, so if I change its value form will be refreshed with new values. How can I do that?</p>
  
  <pre><code>$(document).on 'ready page:load', -&gt;
    $('#time').on "change", -&gt; (
      value = $(this).val()
      $.ajax
        url: "my/_statistics?time=" + value
        type: "GET"
        success: (data) -&gt; (
          #$('#_statistics').html(data)   if I'll comment this line it will work good
        alert data
    )
  )
  </code></pre>