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

Merge pull request #17685 from claudiob/document-form-for-extra-options

Document *all* the options accepted by form_for

Conflicts:
	actionview/lib/action_view/helpers/form_helper.rb
This commit is contained in:
Rafael Mendonça França 2014-11-20 19:03:53 -02:00
commit 8ed5b46ce6

View file

@ -164,6 +164,21 @@ module ActionView
# * <tt>:namespace</tt> - A namespace for your form to ensure uniqueness of
# id attributes on form elements. The namespace attribute will be prefixed
# with underscore on the generated HTML id.
# * <tt>:method</tt> - The method to use when submitting the form, usually
# either "get" or "post". If "patch", "put", "delete", or another verb
# is used, a hidden input with name <tt>_method</tt> is added to
# simulate the verb over post.
# * <tt>:authenticity_token</tt> - Authenticity token to use in the form.
# Use only if you need to pass custom authenticity token string, or to
# not add authenticity_token field at all (by passing <tt>false</tt>).
# Remote forms may omit the embedded authenticity token by setting
# <tt>config.action_view.embed_authenticity_token_in_remote_forms = false</tt>.
# This is helpful when you're 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>:remote</tt> - If set to true, will allow the Unobtrusive
# JavaScript drivers to control the submit behavior. By default this
# behavior is an ajax submit.
# * <tt>:enforce_utf8</tt> - If set to false, a hidden input with name
# utf8 is not output.
# * <tt>:html</tt> - Optional HTML attributes for the form tag.