title: Detect server down when submit remote: true in Rails
body: <p>Can I detect when client couldn't send request to server ? (server down or broken internet link or something ...)</p>
  
  <p>Exp. when I submit form or click link with <code>remote: true</code>, if request couldn't come to server, I could show a message to user.</p>
  
  <pre><code>&lt;%= form_for @item, remote: true do %&gt;
      ....
  &lt;% end %&gt;
  
   or
  
  &lt;%= link_to @item, remote: true %&gt;
  </code></pre>