aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-09-19 00:33:17 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-09-19 00:33:17 +0300
commit3a34d9a64071edfb3958ad0dfe549b19ce89cd73 (patch)
treef12d81c216019ac2578f46ef71dd7ec0281db8ba /actionpack
parent1e7b8d3a227846d488d16cd3fe9de13aa2f19c7c (diff)
downloadrails-3a34d9a64071edfb3958ad0dfe549b19ce89cd73.tar.gz
rails-3a34d9a64071edfb3958ad0dfe549b19ce89cd73.tar.bz2
rails-3a34d9a64071edfb3958ad0dfe549b19ce89cd73.zip
fix shadowing outer local variable warning
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb6
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 c3c1921706..ebbacfc455 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -41,12 +41,12 @@ module ActionController
when Symbol, String then
params[filter] = self[filter] if has_key?(filter)
when Hash then
- self.slice(*filter.keys).each do |key, value|
- return unless value
+ self.slice(*filter.keys).each do |key, values|
+ return unless values
key = key.to_sym
- params[key] = each_element(value) do |value|
+ params[key] = each_element(values) do |value|
# filters are a Hash, so we expect value to be a Hash too
next if filter.is_a?(Hash) && !value.is_a?(Hash)