aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorAldo "xoen" Giambelluca <xoen@xoen.org>2012-08-31 08:45:14 +0200
committerAldo "xoen" Giambelluca <xoen@xoen.org>2012-08-31 08:53:20 +0200
commit030af5e9243a57c2e8bda523ca23fb7d6f5575ed (patch)
treeaf67e58261a4d64f39230221ad3d77297a82a86a /guides
parentb54e5775de99b6c786669a52ab771ac1c44fb82f (diff)
downloadrails-030af5e9243a57c2e8bda523ca23fb7d6f5575ed.tar.gz
rails-030af5e9243a57c2e8bda523ca23fb7d6f5575ed.tar.bz2
rails-030af5e9243a57c2e8bda523ca23fb7d6f5575ed.zip
In example about params naming conventions use params[:person] [ci skip]
The example is about a Person model, say that "params[:model] would usually be a hash of all the attributes for the person to create" could be confusing. I changed to params[:person] since the example is about a Person creation.
Diffstat (limited to 'guides')
-rw-r--r--guides/source/form_helpers.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/form_helpers.textile b/guides/source/form_helpers.textile
index f2d8755bf0..d507a04c1b 100644
--- a/guides/source/form_helpers.textile
+++ b/guides/source/form_helpers.textile
@@ -654,7 +654,7 @@ If +f+ is an instance of FormBuilder then this will render the +form+ partial, s
h3. Understanding Parameter Naming Conventions
As you've seen in the previous sections, values from forms can be at the top level of the +params+ hash or nested in another hash. For example in a standard +create+
-action for a Person model, +params[:model]+ would usually be a hash of all the attributes for the person to create. The +params+ hash can also contain arrays, arrays of hashes and so on.
+action for a Person model, +params[:person]+ would usually be a hash of all the attributes for the person to create. The +params+ hash can also contain arrays, arrays of hashes and so on.
Fundamentally HTML forms don't know about any sort of structured data, all they generate is name–value pairs, where pairs are just plain strings. The arrays and hashes you see in your application are the result of some parameter naming conventions that Rails uses.