提交 3a34d9a6 编写于 作者: S Sergey Nartimov

fix shadowing outer local variable warning

上级 1e7b8d3a
......@@ -41,12 +41,12 @@ def permit(*filters)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册