1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Documentation Working with Javascript Fix remote: true (#44123)

* Fix remote: true

The explanation after the form example, 
"Because the form's remote option is set to true, the request will be posted to the UsersController as an Ajax request, looking for JavaScript..."
Infers the form example has the remote: true

* Update guides/source/working_with_javascript_in_rails.md

change to local: false as suggested by @p8

Co-authored-by: Petrik de Heus <petrik@deheus.net>
This commit is contained in:
Paulo Felipe Souza 2022-01-09 03:35:49 -03:00 committed by GitHub
parent 97e3c32523
commit f63980173e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -433,7 +433,7 @@ The index view (`app/views/users/index.html.erb`) contains:
<br>
<%= form_with model: @user do |form| %>
<%= form_with model: @user, local: false do |form| %>
<%= form.label :name %><br>
<%= form.text_field :name %>
<%= form.submit %>