Merge pull request #40946 from kylekeesling/master
Update`form_with` and`form_for` API documentation to reflect new local method default [ci skip]
This commit is contained in:
commit
88ef9b2276
|
@ -186,8 +186,7 @@ module ActionView
|
||||||
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
|
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
|
||||||
# unnecessary unless you support browsers without JavaScript.
|
# unnecessary unless you support browsers without JavaScript.
|
||||||
# * <tt>:remote</tt> - If set to true, will allow the Unobtrusive
|
# * <tt>:remote</tt> - If set to true, will allow the Unobtrusive
|
||||||
# JavaScript drivers to control the submit behavior. By default this
|
# JavaScript drivers to control the submit behavior.
|
||||||
# behavior is an ajax submit.
|
|
||||||
# * <tt>:enforce_utf8</tt> - If set to false, a hidden input with name
|
# * <tt>:enforce_utf8</tt> - If set to false, a hidden input with name
|
||||||
# utf8 is not output.
|
# utf8 is not output.
|
||||||
# * <tt>:html</tt> - Optional HTML attributes for the form tag.
|
# * <tt>:html</tt> - Optional HTML attributes for the form tag.
|
||||||
|
@ -323,10 +322,8 @@ module ActionView
|
||||||
# remote: true
|
# remote: true
|
||||||
#
|
#
|
||||||
# in the options hash creates a form that will allow the unobtrusive JavaScript drivers to modify its
|
# in the options hash creates a form that will allow the unobtrusive JavaScript drivers to modify its
|
||||||
# behavior. The expected default behavior is an XMLHttpRequest in the background instead of the regular
|
# behavior. The form submission will work just like a regular submission as viewed by the receiving
|
||||||
# POST arrangement, but ultimately the behavior is the choice of the JavaScript driver implementor.
|
# side (all elements available in <tt>params</tt>).
|
||||||
# Even though it's using JavaScript to serialize the form elements, the form submission will work just like
|
|
||||||
# a regular submission as viewed by the receiving side (all elements available in <tt>params</tt>).
|
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
#
|
#
|
||||||
|
@ -536,11 +533,6 @@ module ActionView
|
||||||
# accessible as <tt>params[:title]</tt> and <tt>params[:post][:title]</tt>
|
# accessible as <tt>params[:title]</tt> and <tt>params[:post][:title]</tt>
|
||||||
# respectively.
|
# respectively.
|
||||||
#
|
#
|
||||||
# By default +form_with+ attaches the <tt>data-remote</tt> attribute
|
|
||||||
# submitting the form via an XMLHTTPRequest in the background if an
|
|
||||||
# Unobtrusive JavaScript driver, like rails-ujs, is used. See the
|
|
||||||
# <tt>:local</tt> option for more.
|
|
||||||
#
|
|
||||||
# For ease of comparison the examples above left out the submit button,
|
# For ease of comparison the examples above left out the submit button,
|
||||||
# as well as the auto generated hidden fields that enable UTF-8 support
|
# as well as the auto generated hidden fields that enable UTF-8 support
|
||||||
# and adds an authenticity token needed for cross site request forgery
|
# and adds an authenticity token needed for cross site request forgery
|
||||||
|
@ -612,8 +604,10 @@ module ActionView
|
||||||
# This is helpful when fragment-caching the form. Remote forms
|
# This is helpful when fragment-caching the form. Remote forms
|
||||||
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
|
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
|
||||||
# unnecessary unless you support browsers without JavaScript.
|
# unnecessary unless you support browsers without JavaScript.
|
||||||
# * <tt>:local</tt> - By default form submits are remote and unobtrusive XHRs.
|
# * <tt>:local</tt> - By default form submits via typical HTTP requests.
|
||||||
# Disable remote submits with <tt>local: true</tt>.
|
# 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>:skip_enforcing_utf8</tt> - If set to true, a hidden input with name
|
# * <tt>:skip_enforcing_utf8</tt> - If set to true, a hidden input with name
|
||||||
# utf8 is not output.
|
# utf8 is not output.
|
||||||
# * <tt>:builder</tt> - Override the object used to build the form.
|
# * <tt>:builder</tt> - Override the object used to build the form.
|
||||||
|
|
Loading…
Reference in New Issue