From 00fe726a764c3a935351999022d3eac5cc89aac5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 6 Mar 2005 13:57:16 +0000 Subject: [PATCH] Updated docs on auto-indexing #765 [Astinus] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index e4b90e42f2..32233d26d6 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -45,6 +45,14 @@ module ActionView # # # + # If the object name contains square brackets the id for the object will be inserted. Example: + # + # <%= textfield "person[]", "name" %> + # + # ...becomes: + # + # + # # If the helper is being used to generate a repetitive sequence of similar form elements, for example in a partial # used by render_collection_of_partials, the "index" option may come in handy. Example: #