Closed wordjelly closed 6 years ago
Hi,
I was able to solve this problem. I am posting my specific scenario here, in case anyone else needs help. The issue was that I was rendering a form in the js.erb that had the same id as a form that was already on the earlier page. Even though I was replacing the older form by writing out entirely new content to the parent div, it seems the jquery binding does not occur if an element with the same id was previously present on the page. I changed the ids, so that unique ids are generated, and the form began submitting as ajax.
HTH.
Hi,
I have been googling for several hours, and although several people seem to have had issues with this, I cannot find a definitive way around it.
I tried disabling turbolinks, but it does not make any difference.
Versions: Rails: (4.2.10) Jquery - rails : 4.2.2
Thanks, Bhargav