title: Simple form for remote true responding with html
body: <p>I have a form with a remote true. When i hit submit, i am only responding with js. The problem is that the server is not responding with javasctipt, but rather with html.</p>
  
  <p>My form.</p>
  
  <pre><code>= simple_form_for @company, :remote =&gt; true,  :url =&gt; {:controller =&gt; 'companies', :action =&gt; 'update_company'}, :html =&gt; { :multipart =&gt; true, :class =&gt; 'company_name' }  do |f|
    = f.input :name
    = f.input :submit
  </code></pre>
  
  <p>In my controller</p>
  
  <pre><code>def update_company
    if @company.update(company_attributes)
      respond_to do |format|
        format.js
      end
    end
  end
  </code></pre>
  
  <p>I am requiring all jquery files.
  This is working everywhere but in this action.</p>
  
  <p>My response header from server:</p>
  
  <pre><code>Connection:keep-alive
  Content-Length:0
  Content-Type:text/html; charset=utf-8
  Date:Thu, 24 Sep 2015 22:02:17 GMT
  Server:nginx/1.8.0 + Phusion Passenger 5.0.13
  Status:406 Not Acceptable
  Strict-Transport-Security:max-age=31536000
  X-Powered-By:Phusion Passenger 5.0.13
  </code></pre>
  
  <p>My request header:</p>
  
  <pre><code>Accept:text/javascript
  Accept-Encoding:gzip, deflate
  Accept-Language:en-US,en;q=0.8
  Connection:keep-alive
  Content-Length:1048
  Content-Type:application/x-www-form-urlencoded; charset=UTF-8
  Cookie: _LongFreakingHash
  </code></pre>
  
  <p>Let me know if you need more information. I am at a loss here.
  If you have come across this before, your input would help me tons.</p>