Submitting a Rails Ajax form with Javascript or a Link
When using remote_form_for or its relatives, it won’t work to use javascript can’t call .submit() on the form; that will treat is a regular form submit. The following is an example of what not to do. (By the way, I use HAML and jQuery in my code samples.)
And here’s the workaround I’m using..