title: In rails controllers, how to prevent double submit (when user double-clic submit button or hit enter twice)?
body: <p>Well, everything's in the title but I'll explain a little more :-)</p>
  
  <p>My rails app contain many forms (Ajaxified or not).</p>
  
  <p>To prevent users to submit twice or more some forms, I use Javascript.</p>
  
  <p>There's my scenario for a Ajaxified form :</p>
  
  <ul>
  <li>the user submit the form (clic or enter)</li>
  <li>the javascript disable the submit button</li>
  <li>the rails controller do things (like a Soap request or an insert in a DB)</li>
  <li>the rails controller update the page and enable the submit button if necessary (in case of errors)</li>
  </ul>
  
  <p>Now <strong>I want to add server side code</strong> to keeps things really clean if the user bypass the javascript.</p>
  
  <p>Any suggestions?</p>