diff options
author | Xavier Noria <fxn@hashref.com> | 2013-11-08 07:49:31 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-11-08 07:49:31 -0800 |
commit | f0963a61adcf8ac2d09a88eb3c60339dd1b1f0fc (patch) | |
tree | 23e8cf504177c1f9a3824b3b468ab77d6e9cc11c /guides | |
parent | dc5070e78a4057522730fcb11f0bfbcdea27a241 (diff) | |
parent | 872b3c91b3d6bd5b418463cb92ecc05bce39649d (diff) | |
download | rails-f0963a61adcf8ac2d09a88eb3c60339dd1b1f0fc.tar.gz rails-f0963a61adcf8ac2d09a88eb3c60339dd1b1f0fc.tar.bz2 rails-f0963a61adcf8ac2d09a88eb3c60339dd1b1f0fc.zip |
Merge pull request #12609 from corwinkelly/patch-1
Update workaround for "Outside the Scope of Strong Parameters"
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/action_controller_overview.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index cd4a1a0792..82a23b3dc0 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -328,9 +328,7 @@ the job done: ```ruby def product_params - params.require(:product).permit(:name).tap do |whitelisted| - whitelisted[:data] = params[:product][:data] - end + params.require(:product).permit(:name, { data: params[:product][:data].try(:keys) }) end ``` |