I have a Bootstrap modal dialog which contains a form. The modal dialog contains a submit and a cancel button. Now on submit button click the form is submitted
submit
I am using rails and ajax too and I had the same problem. just run this code
$('#modalName').modal('hide');
that worked for me but I am trying to also fix it without using jQuery.