[Rails] About local: true described in form_with

Why write local: true

When submitting a form with rails, describe local: true under form_with, At first, I didn't understand the meaning and wrote the code by imitating it without thinking deeply about what it was.

form_with.png

However, it is unpleasant to proceed with learning without understanding the meaning, so when I looked it up again, In rails5, if you do not describe local: true, it means sending the form by ajax communication, so when you send the form as HTML, you need to describe local: true.

Recommended Posts

[Rails] About local: true described in form_with
[Introduction to Rails] form_with (local: true)
About redirect_to in form_with
About the symbol <%%> in Rails erb
[Rails] About helper method form_with [Basic]
About Rails 6
[Rails] form_with
About Rails routing
[Rails] Run LINEBot in local environment using ngrok
rails tutorial About account activation in production environment
Rails5.1 + puma SSL connection in local production environment
About var used in Java (Local Variable Type)
Group_by in Rails
[Rails] About ActiveJob ,!
About Rails controller
About RSpec (Rails)
Questions about implementing the Like feature (Ajax) in Rails
SSL in the local environment of Docker / Rails / puma
[Rails] About migration files
[Rails] About active hash
About rails application server
Model association in Rails
Adding columns in Rails
About eval in Ruby
About rails kaminari pagination
About rails version specification
Disable turbolinks in Rails
MEMO about Rails 6 series
[Rails] About Slim notation
^, $ in Rails regular expression
Use images in Rails
Understand migration in rails
About form. ○○ of form_with
Delve into Rails form_with
[rails] About devise defaults
Split routes.rb in Rails6
[Rails] Completely understand form_with
Rails: About partial templates
About rails strong parameters
[Beginner] About Rails Session
About docker.credentials.errors.StoreErrorTraceback in wsl2
Implement markdown in Rails
When using Slim in Ruby on Rails, "undefined local variable or method` f'for "is displayed in form_with