title: Issues executing Update.js
body: <p>I have a controller where the update action responds to js. Everything is going fine but I'm experiencing some really bizarre behavior. Her is my code:</p>
  
  <pre><code>&lt;% if @contact.errors.any? %&gt;
  &lt;% else %&gt;
    alert('What!?!');
    $("li#contact").replaceWith("&lt;%= escape_javascript render @contact %&gt;");
  &lt;% end %&gt;
  </code></pre>
  
  <p>When I have no errors, I'm able to replace my list item. However nothing before or after this line with run. The alert will not pop, any other manipulation will not run. Even cutting down the code to:</p>
  
  <pre><code>&lt;% if @contact.errors.any? %&gt;
      &lt;% else %&gt;
        alert('What!?!');
      &lt;% end %&gt;
  </code></pre>
  
  <p>I can not get it to alert. I know I don't have error rendering yet but what I'm executing has no errors. Has anyone experienced with wonky behavior before? (create.js, destroy.js all work fine).</p>