title: duplicate ajax calls when include jquery ujs in rails application
body: <p>i am developing a basic depot application with rails 
  i have added a button </p>
  
  <pre><code>&lt;%= button_to 'Add to Cart', line_items_path(product_id: product) , remote: true %&gt;
  </code></pre>
  
  <p>when i click on home page hyperlink then click on the button again , ajax gets duplicated , if i click on home page 3 times , the button ajax call 3 times and so on</p>
  
  <p>Note : the problem disappear when i remove jquery-ujs from application.js</p>
  
  <p>line_item controller</p>
  
  <pre><code>def create
  @cart = current_cart
  product = Product.find(params[:product_id])
  @line_item = @cart.add_product product
  @line_item.save
  respond_to do |format|
    if @line_item.save
      format.html { redirect_to store_url }
      format.js { @current_item = @line_item }
      format.json { render :show, status: :created, location: @line_item }
    else
      format.html { render :new }
      format.json { render json: @line_item.errors, status: :unprocessable_entity }
    end
  end
  end
  </code></pre>
  
  <p>home page action</p>
  
  <pre><code>def index
  @products = Product.order(:title)
  @cart = current_cart
  end
  </code></pre>
  
  <p>application.js</p>
  
  <pre><code>// This is a manifest file that'll be compiled into application.js,
  // listed below.
  //
  //= require jquery
  //= require turbolinks
  //= require jquery-ui
  //= require jquery_ujs
  //= require_tree .
  </code></pre>
  
  <p>ajax response should render this js file
  show.js.erb</p>
  
  <pre><code>$('#cart').html("&lt;%=j render @cart %&gt;");
  //#START_HIGHLIGHT
  $('#current_item').css({'background-color':'#88ff88'})
  .animate({'background-color':'#114411'} , 1000);
  </code></pre>
  
  <p>using gem jquery rails 4.0.4</p>