title: How to avoid to evaluate a JavaScript response?
body: <p>I am using Ruby on Rails 4. In <a href="https://stackoverflow.com/questions/23715384/how-to-handle-javascript-events-of-a-link-to-remote-element-a-la-rails-way">my previos question</a> I asked about how to handle JavaScript events of a <code>link_to :remote</code> element "a là Rails Way". However I would like to make the AJAX to do <em>not</em> evaluate the JavaScript response (whatever it is) so that I can implement my custom behaviors.</p>
  
  <p>In my case the AJAX response that should be ignored is generated by clicking the following link:</p>
  
  <pre><code>link_to('destroy', article_path(@article), :method =&gt; :delete, :remote =&gt; true, :id =&gt; 'css_id')
  </code></pre>
  
  <p>On success it will return a JS redirect but I would like to simply catch the success response and do not evaluate the subsequent redirect.</p>
  
  <pre><code>$('#css_id').on('ajax:success', function(event, xhr, status) {
    alert("success!");
  
    \\ Here I would like to do not evaluate the JS response.
  });
  </code></pre>
  
  <p>How can I make that?</p>