From 582e7c115ed7a0e0ba09821f0f51c895d09519d0 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 7 Jan 2009 23:56:02 +0000 Subject: Regen guides --- railties/doc/guides/html/form_helpers.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/doc/guides/html/form_helpers.html') diff --git a/railties/doc/guides/html/form_helpers.html b/railties/doc/guides/html/form_helpers.html index 84f22d0a9c..4af2dec344 100644 --- a/railties/doc/guides/html/form_helpers.html +++ b/railties/doc/guides/html/form_helpers.html @@ -539,7 +539,7 @@ output: </div> ... -

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).

2. Different Families of helpers

@@ -568,7 +568,7 @@ output:
<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.

@@ -992,7 +992,7 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
{'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

@@ -1086,7 +1086,7 @@ http://www.gnu.org/software/src-highlite -->

9. 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:

  • -- cgit v1.2.3