title: Ajax request gets to server but page doesn't update - Rails, jQuery
body: <p>So I have a scenario where my jQuery ajax request is hitting the server, but the page won't update.  I'm stumped...</p>
  
  <p>Here's the ajax request:</p>
  
  <pre><code>$.ajax({
      type: 'GET',
      url: '/jsrender',
      data: "id=" + $.fragment().nav.replace("_link", "")
  });
  </code></pre>
  
  <p>Watching the rails logs, I get the following:</p>
  
  <pre><code>Processing ProductsController#jsrender (for 127.0.0.1 at 2010-03-17 23:07:35) [GET]
  Parameters: {"action"=&gt;"jsrender", "id"=&gt;"products", "controller"=&gt;"products"}
    ...
  Rendering products/jsrender.rjs
  Completed in 651ms (View: 608, DB: 17) | 200 OK [http://localhost/jsrender?id=products]
  </code></pre>
  
  <p>So, it seems apparent to me that the ajax request is getting to the server.  The code in the jsrender method is being executed, but the code in the jsrender.rjs doesn't fire.  Here's the method, jsrender:</p>
  
  <pre><code>def jsrender
      @currentview = "shared/#{params[:id]}"   
      respond_to do |format|
          format.js {render :template =&gt; 'products/jsrender.rjs'}
      end
  end
  </code></pre>
  
  <p>For the sake of argument, the code in jsrender.rjs is:</p>
  
  <pre><code>page&lt;&lt;"alert('this works!');"
  </code></pre>
  
  <p>Why is this?  I see in the params that there is no authenticity_token, but I have tried passing an authenticity_token as well with the same result.  </p>
  
  <p>Thanks in advance.</p>