Permalink
Browse files

Merge pull request #9004 from arunagw/warning_removed_shadowing_outer

Removing warning: shadowing outer local variable
  • Loading branch information...
2 parents cbec22c + 53ea940 commit 74c2af5b91248565d0bd8174aec3f0737b79535c @guilleiguaran guilleiguaran committed Jan 20, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -382,9 +382,9 @@ def permitted_scalar_filter(params, key)
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

0 comments on commit 74c2af5

Please sign in to comment.