aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/form_helpers.md
diff options
context:
space:
mode:
authorDerek Reeve <derek@devbootcamp.com>2015-01-13 10:19:59 -0800
committerDerek Reeve <derek@devbootcamp.com>2015-01-13 10:19:59 -0800
commitb5c1bbbee01f64532d0cbc236ed364f1b0589a1a (patch)
tree0f6db38874701f2f4668a9284919984cda6c43f3 /guides/source/form_helpers.md
parent3f14d6a7277c470c5ec07fd267076193c8547daf (diff)
downloadrails-b5c1bbbee01f64532d0cbc236ed364f1b0589a1a.tar.gz
rails-b5c1bbbee01f64532d0cbc236ed364f1b0589a1a.tar.bz2
rails-b5c1bbbee01f64532d0cbc236ed364f1b0589a1a.zip
Fix form_for guide binding a form to an object.
The HTML generated using url: { action: :create} will not generate the form action "/articles/create", it should generate the form action "/articles" for a new object.
Diffstat (limited to 'guides/source/form_helpers.md')
-rw-r--r--guides/source/form_helpers.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md
index a8dcd3ee4f..4ec3a7c010 100644
--- a/guides/source/form_helpers.md
+++ b/guides/source/form_helpers.md
@@ -275,7 +275,7 @@ There are a few things to note here:
The resulting HTML is:
```html
-<form accept-charset="UTF-8" action="/articles/create" method="post" class="nifty_form">
+<form accept-charset="UTF-8" action="/articles" method="post" class="nifty_form">
<input id="article_title" name="article[title]" type="text" />
<textarea id="article_body" name="article[body]" cols="60" rows="12"></textarea>
<input name="commit" type="submit" value="Create" />
@@ -300,7 +300,7 @@ You can create a similar binding without actually creating `<form>` tags with th
which produces the following output:
```html
-<form accept-charset="UTF-8" action="/people/create" class="new_person" id="new_person" method="post">
+<form accept-charset="UTF-8" action="/people" class="new_person" id="new_person" method="post">
<input id="person_name" name="person[name]" type="text" />
<input id="contact_detail_phone_number" name="contact_detail[phone_number]" type="text" />
</form>