With rails code:
= button_to "-", availability_time_span_path(ts) ,:method => :delete, :remote => true
I generate html form, which should be posted via ajax:
<form action="/availability_time_spans/175" class="button_to" data-remote="true" method="post">
<div>
<input name="_method" type="hidden" value="delete">
<input type="submit" value="-">
<input name="authenticity_token" type="hidden" value="n962qRxizeXeoEwWYv2AlMfT4nKxxp9ITUxm5wp1nZo=">
</div>
</form>
When I click on the submit button it is posted twice. Once as: text/javascript from jquery.js:8417 , second time as: text/html from Other