Skip to content

Commit 1b0689d

Browse files
committed
Merge pull request ryanb#302 from sunny/patch-1
Strong parameter ends with "_attributes" in README.md
2 parents 30cfe18 + 24ecbcb commit 1b0689d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if the object is marked for destruction.
6767
For Rails 4 or people using the "strong_parameters" gem, here is an example:
6868

6969
```ruby
70-
params.require(:project).permit(:name, tasks: [:id, :name, :_destroy])
70+
params.require(:project).permit(:name, tasks_attributes: [:id, :name, :_destroy])
7171
```
7272

7373
The `:id` is to make sure you do not end up with a whole lot of tasks.

0 commit comments

Comments
 (0)