title: Why is the respond_to js not being executing using jQuery AJAX in Ruby on Rails?
body: <p>I'm running a simple AJAX post to my server and the <code>respond_to</code> .js block is returned as a 200 success but is not executed.  Am I missing something in my configuration or in my code for the execution the return js code?  I'm using Ruby on Rails 3.2.9.</p>
  
  <p>javascript:</p>
  
  <pre><code>    $("#test-submit").on("click",function(event){
        $.ajax({
          type: "POST",
          url: '/users',
          dataType: 'json',
          data: {
            "test" : "test-data"
          }
        });
        event.preventDefault();
      });
  </code></pre>
  
  <p>controller action:</p>
  
  <pre><code>  def create
      user = User.find(current_user)
  
      respond_to do |format|
        format.js { }
      end
    end
  </code></pre>
  
  <p>user create.js.erb:</p>
  
  <pre><code>alert('hai');
  </code></pre>