title: Custom button for onclick event inside form causes redirect
body: <p>I have <code>&lt;button onclick="doSomething();"&gt;Do something&lt;/button&gt;</code> inside <code>form_for</code> helper. Сlicking on it causes form submission. Instead I want only to do something client-side work for what it is intended.<br>
  How can I achieve it?</p>
  
  <p>EDIT: I can use only <code>&lt;button&gt;</code> tag for my purposes and it'll be rather well if I could place it inside form.</p>