From 3a34d9a64071edfb3958ad0dfe549b19ce89cd73 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Wed, 19 Sep 2012 00:33:17 +0300 Subject: fix shadowing outer local variable warning --- actionpack/lib/action_controller/metal/strong_parameters.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack') 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) -- cgit v1.2.3