diff options
author | Arun Agrawal <arunagw@gmail.com> | 2013-01-20 23:02:02 +0530 |
---|---|---|
committer | Arun Agrawal <arunagw@gmail.com> | 2013-01-20 23:02:02 +0530 |
commit | 53ea940c5b7ba907f89747c6b959374f635c9a39 (patch) | |
tree | 299ec6f8c0360b113bff24d83b628976411ec10d /actionpack | |
parent | cbec22ce5783c9530b3e2735a8e13eeeca00e0d2 (diff) | |
download | rails-53ea940c5b7ba907f89747c6b959374f635c9a39.tar.gz rails-53ea940c5b7ba907f89747c6b959374f635c9a39.tar.bz2 rails-53ea940c5b7ba907f89747c6b959374f635c9a39.zip |
Removing warning: shadowing outer local variable
Diffstat (limited to 'actionpack')
-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 |