diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2009-01-04 01:36:08 +0000 |
---|---|---|
committer | Frederick Cheung <frederick.cheung@gmail.com> | 2009-01-04 01:36:08 +0000 |
commit | 33fe26ef3622b2411ef79b8c7c8a481157471534 (patch) | |
tree | d5534dda50fbed23a7c5dcf63257de597b448361 /railties | |
parent | ccae605bcae3d18e54f2c122a13e2088a8dc1b6e (diff) | |
download | rails-33fe26ef3622b2411ef79b8c7c8a481157471534.tar.gz rails-33fe26ef3622b2411ef79b8c7c8a481157471534.tar.bz2 rails-33fe26ef3622b2411ef79b8c7c8a481157471534.zip |
fix typos etc. picked up by Xavier
Diffstat (limited to 'railties')
-rw-r--r-- | railties/doc/guides/source/form_helpers.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt index 3880458e9d..d60ed10a39 100644 --- a/railties/doc/guides/source/form_helpers.txt +++ b/railties/doc/guides/source/form_helpers.txt @@ -188,7 +188,7 @@ output: ... ---------------------------------------------------------------------------- -When parsing POSTed data, Rails will take into account the special `"_method"` parameter and act as if the HTTP method was the one specified inside it ("PUT" in this example). +When parsing POSTed data, Rails will take into account the special `_method` parameter and act as if the HTTP method was the one specified inside it ("PUT" in this example). Different Families of helpers ------------------------------ @@ -221,7 +221,7 @@ will produce output similar to --------------------------- <input id="person_name" name="person[name]" type="text" value="Henry"/> --------------------------- -Upon form submission the value entered by the user will be stored in `params[:person][:name]`. The params[:person] hash is suitable for passing to `Person.new` or, if `@person` is an instance of Person, `@person.update_attributes`. +Upon form submission the value entered by the user will be stored in `params[:person][:name]`. The `params[:person]` hash is suitable for passing to `Person.new` or, if `@person` is an instance of Person, `@person.update_attributes`. [WARNING] ============================================================================ @@ -635,7 +635,7 @@ the params hash will contain ----------------- {'person' => {'name' => 'Henry'}} ----------------- -and `params[\'name\']` will retrieve the submitted value in the controller. +and `params["name"]` will retrieve the submitted value in the controller. Hashes can be nested as many levels as required, for example ------------------ @@ -727,7 +727,7 @@ produces exactly the same output as the previous example. Complex forms ------------- -Many apps grow beyond simple forms editing a single object. For example when creating a Person instance you might want to allow the user to (on the same form) create multiple address records (home, work etc...). When later editing that person the user should be able to add, remove or amend addresses as necessary. While this guide has shown you all the pieces necessary to handle this, Rails does not yet have a standard end-to-end way of accomplishing this, but many have come up with viable approaches. These include: +Many apps grow beyond simple forms editing a single object. For example when creating a Person instance you might want to allow the user to (on the same form) create multiple address records (home, work etc.). When later editing that person the user should be able to add, remove or amend addresses as necessary. While this guide has shown you all the pieces necessary to handle this, Rails does not yet have a standard end-to-end way of accomplishing this, but many have come up with viable approaches. These include: * Ryan Bates' series of railscasts on http://railscasts.com/episodes/75[complex forms] * Handle Multiple Models in One Form from http://media.pragprog.com/titles/fr_arr/multiple_models_one_form.pdf[Advanced Rails Recipes] |