diff options
author | Dominic Cleal <dominic@cleal.org> | 2017-01-24 10:55:43 +0000 |
---|---|---|
committer | Dominic Cleal <dominic@cleal.org> | 2017-12-06 14:50:35 +0000 |
commit | d7a121a0d624dd8180556521f0611d4c8e2c648f (patch) | |
tree | 4743d2db9cf6ee807b1e8e7560a369d0002d6fc4 /actionpack/lib | |
parent | ce37e1643a62436a7c0ce059def4c5d9c72f7367 (diff) | |
download | rails-d7a121a0d624dd8180556521f0611d4c8e2c648f.tar.gz rails-d7a121a0d624dd8180556521f0611d4c8e2c648f.tar.bz2 rails-d7a121a0d624dd8180556521f0611d4c8e2c648f.zip |
Yield array from AC::Parameters#each for block with one arg
Matches Hash#each behaviour as used in Rails 4.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 2 |
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 ef7c4c4c16..a56ac749f8 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -335,7 +335,7 @@ module ActionController # the same way as <tt>Hash#each_pair</tt>. def each_pair(&block) @parameters.each_pair do |key, value| - yield key, convert_hashes_to_parameters(key, value) + yield [key, convert_hashes_to_parameters(key, value)] end end alias_method :each, :each_pair |