mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Updated docs on auto-indexing #765 [Astinus]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
87b55f59dd
commit
00fe726a76
1 changed files with 8 additions and 0 deletions
|
@ -45,6 +45,14 @@ module ActionView
|
|||
# <input type="submit" value="Save">
|
||||
# </form>
|
||||
#
|
||||
# If the object name contains square brackets the id for the object will be inserted. Example:
|
||||
#
|
||||
# <%= textfield "person[]", "name" %>
|
||||
#
|
||||
# ...becomes:
|
||||
#
|
||||
# <input type="text" id="person_<%= @person.id %>_name" name="person[<%= @person.id %>][name]" value="<%= @person.name %>" />
|
||||
#
|
||||
# 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:
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue