aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-11-08 07:49:31 -0800
committerXavier Noria <fxn@hashref.com>2013-11-08 07:49:31 -0800
commitf0963a61adcf8ac2d09a88eb3c60339dd1b1f0fc (patch)
tree23e8cf504177c1f9a3824b3b468ab77d6e9cc11c /guides
parentdc5070e78a4057522730fcb11f0bfbcdea27a241 (diff)
parent872b3c91b3d6bd5b418463cb92ecc05bce39649d (diff)
downloadrails-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.md4
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
```