aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-06 02:04:44 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-06 02:07:36 -0300
commit14b66d6628158c9a0e08d19bb570f89fd76026cd (patch)
tree1d90994c94010cbc62e8ee03b46574c19c91140b /actionpack
parent639efb93135c765dcf5c4aa09c30a8b4973c8421 (diff)
downloadrails-14b66d6628158c9a0e08d19bb570f89fd76026cd.tar.gz
rails-14b66d6628158c9a0e08d19bb570f89fd76026cd.tar.bz2
rails-14b66d6628158c9a0e08d19bb570f89fd76026cd.zip
We don't need the each call since grep take a block and yield each match
to the block. Thanks @tenderlove
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index 8c3b02d357..398454d39f 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -178,7 +178,7 @@ module ActionController
case filter
when Symbol, String then
params[filter] = self[filter] if has_key?(filter)
- keys.grep(/\A#{Regexp.escape(filter)}\(\di\)\z/).each { |key| params[key] = self[key] }
+ keys.grep(/\A#{Regexp.escape(filter)}\(\di\)\z/) { |key| params[key] = self[key] }
when Hash then
self.slice(*filter.keys).each do |key, values|
return unless values