Remote Rails form loaded via Ajax after the finished document is not submitted

I have a remote form using form_tag and :remote => true , which loads from partial. When I load a form in its own way, as usual, it works as intended. However, I will try to load the batch on another page via AJAX after the document is ready. When I try to submit this form, nothing happens. I tried the regular submit button and typed form.submit() .

Is there some kind of javascript initialization for remote forms that Rails does, what should I duplicate? Or is something else happening here?

+5
source share
1 answer

The only thing I can think of with my head is the CSRF token, which has gone out of form.

0
source

Source: https://habr.com/ru/post/945285/


All Articles