From 7f41a08fd8614022ec693c374178846973fcd8c2 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 27 Sep 2012 16:56:55 -0300 Subject: Is not needed to wrap name inside an array here --- actionpack/lib/action_controller/metal/strong_parameters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 7afa49a833..51c65e5e70 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -160,7 +160,7 @@ module ActionController # } # }) # - # 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 -- cgit v1.2.3