diff options
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index 02d9c0b4fb..e03777b5bb 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -382,9 +382,9 @@ module ActionController params[key] = self[key] end - keys.grep(/\A#{Regexp.escape(key)}\(\d+[if]?\)\z/).each do |key| - if permitted_scalar?(self[key]) - params[key] = self[key] + keys.grep(/\A#{Regexp.escape(key)}\(\d+[if]?\)\z/).each do |k| + if permitted_scalar?(self[k]) + params[k] = self[k] end end end |