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

Merge pull request #41276 from RobinDaugherty/form_with-local-doc

Improve documentation of FormHelper#form_with `local` option [ci skip]
This commit is contained in:
Zachary Scott 2021-05-05 07:16:32 +09:00 committed by GitHub
commit 869532ccea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -603,10 +603,16 @@ module ActionView
# This is helpful when fragment-caching the form. Remote forms
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
# unnecessary unless you support browsers without JavaScript.
# * <tt>:local</tt> - By default form submits via typical HTTP requests.
# Enable remote and unobtrusive XHRs submits with <tt>local: false</tt>.
# Remote forms may be enabled by default by setting
# <tt>config.action_view.form_with_generates_remote_forms = true</tt>.
# * <tt>:local</tt> - Whether to use standard HTTP form submission.
# When set to <tt>true</tt>, the form is submitted via standard HTTP.
# When set to <tt>false</tt>, the form is submitted as a "remote form", which
# is handled by Rails UJS as an XHR. When unspecified, the behavior is derived
# from <tt>config.action_view.form_with_generates_remote_forms</tt> where the
# config's value is actually the inverse of what <tt>local</tt>'s value would be.
# As of Rails 6.1, that configuration option defaults to <tt>false</tt>
# (which has the equivalent effect of passing <tt>local: true</tt>).
# In previous versions of Rails, that configuration option defaults to
# <tt>true</tt> (the equivalent of passing <tt>local: false</tt>).
# * <tt>:skip_enforcing_utf8</tt> - If set to true, a hidden input with name
# utf8 is not output.
# * <tt>:builder</tt> - Override the object used to build the form.