aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-06-28 09:12:24 -0400
committerGitHub <noreply@github.com>2018-06-28 09:12:24 -0400
commit79ef9fbe4639954e7f71463a1184489ffec1e5e6 (patch)
tree8a3b079a87615ae0352ef163b9ad17b70f34551d
parent03fd2f38103b8e22dc75c5e4769f9f90bf0cf3d1 (diff)
parentd90b7726e110c23e76163d0f2e413432bbd4c695 (diff)
downloadrails-79ef9fbe4639954e7f71463a1184489ffec1e5e6.tar.gz
rails-79ef9fbe4639954e7f71463a1184489ffec1e5e6.tar.bz2
rails-79ef9fbe4639954e7f71463a1184489ffec1e5e6.zip
Merge pull request #33246 from anthonycrumley/improve-form-with-wording
Improve wording for form_with in Getting Started Guide
-rw-r--r--guides/source/getting_started.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index de2c459cff..61658cdfc9 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -1203,14 +1203,15 @@ it look as follows:
This time we point the form to the `update` action, which is not defined yet
but will be very soon.
-Passing the article object to the method will automatically set the URL for
+Passing the article object to the `form_with` method will automatically set the URL for
submitting the edited article form. This option tells Rails that we want this
form to be submitted via the `PATCH` HTTP method, which is the HTTP method you're
expected to use to **update** resources according to the REST protocol.
-The arguments to `form_with` could be model objects, say, `model: @article` which would
-cause the helper to fill in the form with the fields of the object. Passing in a
-symbol scope (`scope: :article`) just creates the fields but without anything filled into them.
+Also, passing a model object to `form_with`, like `model: @article` in the edit
+view above, will cause form helpers to fill in form fields with the corresponding
+values of the object. Passing in a symbol scope such as `scope: :article`, as
+was done in the new view, only creates empty form fields.
More details can be found in [form_with documentation]
(http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_with).