I have a form on the home page (all created with scaffold), which I would like when I click on the publish button, I will add the publication to the same home via ajax.
add remote true to the form
= form_for @post, remote: true do |f|
effectively in the navigator element inspector, the form appears in the form:
data-remote="true"
The thing is that even though he sent the request in js he always redirects me to http://localhost:3000/posts/28
instead of staying on the same page waiting for the response file to be able to add it to the home page
I'm using rails 5.0.3 Does anyone know if for that version of rails (remote: true does not work anymore) or do you have to take another step to stop the response in html?