Skip to content
Browse files

Is not needed to wrap name inside an array here

  • Loading branch information...
1 parent 60f77cd commit 7f41a08fd8614022ec693c374178846973fcd8c2 @spastorino spastorino committed Sep 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/strong_parameters.rb
View
2 actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -160,7 +160,7 @@ def require(key)
# }
# })
#
- # permitted = params.permit(person: [ :name, { pets: [ :name ] } ])
+ # permitted = params.permit(person: [ :name, { pets: :name } ])
# permitted.permitted? # => true
# permitted[:person][:name] # => "Francesco"
# permitted[:person][:age] # => nil

0 comments on commit 7f41a08

Please sign in to comment.
Something went wrong with that request. Please try again.