Merge pull request #44897 from claasz/patch-1

Clarified requirements for keys in nested structures
This commit is contained in:
Petrik de Heus 2022-05-11 19:49:03 +02:00 committed by GitHub
commit 4b5410a6aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -985,7 +985,7 @@ The `fields_for` yields a form builder. The parameters' name will be what
}
```
The keys of the `:addresses_attributes` hash are unimportant, they need merely be different for each address.
The actual values of the keys in the `:addresses_attributes` hash are unimportant; however they need to be strings of integers and different for each address.
If the associated object is already saved, `fields_for` autogenerates a hidden input with the `id` of the saved record. You can disable this by passing `include_id: false` to `fields_for`.