aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorAgis Anastasopoulos <corestudiosinc@gmail.com>2012-11-15 23:07:34 +0200
committerAgis Anastasopoulos <corestudiosinc@gmail.com>2012-11-15 23:07:34 +0200
commit204d3afb2ad33dbc8ae1e7a3c94adc41effe7907 (patch)
treeb4d09b5223f00e8d9058763604b9d9d5bc8966b7 /guides
parent3f8bd32de19ce882f63778c68da64461608eb18d (diff)
downloadrails-204d3afb2ad33dbc8ae1e7a3c94adc41effe7907.tar.gz
rails-204d3afb2ad33dbc8ae1e7a3c94adc41effe7907.tar.bz2
rails-204d3afb2ad33dbc8ae1e7a3c94adc41effe7907.zip
Fix 'persons' to 'people' and add some whitespace
Diffstat (limited to 'guides')
-rw-r--r--guides/source/action_view_overview.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md
index 8cb21d43dc..81dbc690c0 100644
--- a/guides/source/action_view_overview.md
+++ b/guides/source/action_view_overview.md
@@ -3,7 +3,7 @@ Action View Overview
In this guide you will learn:
-* What Action View is, and how to use it with Rails
+* What Action View is and how to use it with Rails
* How best to use templates, partials, and layouts
* What helpers are provided by Action View and how to make your own
* How to use localized views
@@ -943,7 +943,7 @@ The core method of this helper, form_for, gives you the ability to create a form
The HTML generated for this would be:
```html
-<form action="/persons/create" method="post">
+<form action="/people/create" method="post">
<input id="person_first_name" name="person[first_name]" type="text" />
<input id="person_last_name" name="person[last_name]" type="text" />
<input name="commit" type="submit" value="Create" />
@@ -953,7 +953,7 @@ The HTML generated for this would be:
The params object created when this form is submitted would look like:
```ruby
-{"action"=>"create", "controller"=>"persons", "person"=>{"first_name"=>"William", "last_name"=>"Smith"}}
+{"action" => "create", "controller" => "people", "person" => {"first_name" => "William", "last_name" => "Smith"}}
```
The params hash has a nested person value, which can therefore be accessed with params[:person] in the controller.