title: Heroku not loading ajax calls
body: <p>I have a feature that lets users add courses to their shopping cart. Everything works fine in development: when a user clicks on the "add to cart" icon, it creates a line_item object in the cart, and the carts_controller executes an AJAX request that loads the updated html for the cart. Here's the code:</p>
  
  <pre><code>  def create
      @user = current_user
      @cart = @user.cart
      @line_item = @cart.line_items.build(params[:line_item]) 
  
      respond_to do |format|
        if @line_item.save
          format.html { redirect_to(root_path, :notice =&gt; 'Course added to cart') }
          format.js { @current_item = @line_item }
          format.xml  { render :xml =&gt; @line_item, :status =&gt; :created, :location =&gt; @line_item }
  </code></pre>
  
  <p>The format.js then references the create.js.erb file:</p>
  
  <pre><code>$("#cart").html("&lt;%= escape_javascript(render(@cart)) %&gt;");
  </code></pre>
  
  <p>This pulls in the @cart partial, which contains the newly inserted line_item. </p>
  
  <p>When I uploaded this to heroku, however, this part of my code broke. When I click on the "add to cart" icon, the line_item is created, but the page has to refresh before it shows the cart. </p>
  
  <p>Is there something I have to do within heroku before it recognizes this kind of AJAX call?</p>
  
  <p>Thanks!</p>