title: 406 Not acceptable error while using form_for :remote => true using jquery in rails 3
body: <p>i am trying to update a div using form_for :remote => true, but its not happening. given below is my code</p>
  
  <p><b>monhtly_report.html.erb</b></p>
  
  <pre><code>&lt;%= form_for(:monthly_detail, :url =&gt; product_report_monthly_details_path,:remote =&gt; true) do |f|%&gt;
  &lt;table class="form-table"&gt;
  &lt;tr&gt;
    &lt;td width="80px"&gt;
      Product
    &lt;/td&gt;
    &lt;td colspan="2"&gt;
      &lt;%= f.collection_select(:product_id, @products, :id,:name, :prompt =&gt; true)%&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      Month
    &lt;/td&gt;
    &lt;td&gt;
      &lt;%= select_month(Date.today, :field_name =&gt; 'selected_month') %&gt;
      &lt;%= select_year(Date.today, :start_year =&gt; 2000, :end_year =&gt; 2020, :field_name =&gt;'selected_year') %&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;/td&gt;
    &lt;td&gt;
      &lt;%=submit_button_tag 'Submit'%&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;%end%&gt;
  &lt;div class="monthlyreportsection"&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>and this is my controller</p>
  
  <pre><code>  def product_report
      @details = MonthlyDetail.find_by_product_id(params[:monthly_detail][:product_id].to_i)
      @time = Date.new(params[:date][:selected_year].to_i, params[:date][:selected_month].to_i,1)
      respond_to do |format|
        format.js
      end
    end
  </code></pre>
  
  <p>P.S : the request is going to controller as html whereas it has to be JS</p>
  
  <p>the product_report.js.erb</p>
  
  <pre><code>$("#monthlyreportsection").html("&lt;%=escape_javascript(render(:partial =&gt; "product_details"))%&gt;")
  </code></pre>
  
  <p>My actual problem is the div is not getting uploaded. help me out. Thanks in advance.</p>