I have a remote => true
form and would like to submit it AND avoid a submit method.
Usually i would do
form$.get(0).submit()
form$.submit(function(){..avoid going here..})
but this sends the form as html instead of js. Any way to do this and get js in response?
Thanks!
man that i was a pain to find.
the answer is replace
$(form).get(0).submit()
$(form)[0].submit()
by
$(form).trigger("submit.rails")
this will skip all submit even listeners except the rails one.