aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorEugene Kenny <elkenny@gmail.com>2019-05-18 22:49:32 +0100
committerEugene Kenny <elkenny@gmail.com>2019-05-18 22:49:32 +0100
commit46e84d5b104ca5dca88829c9db7941f0e6ce7aaa (patch)
treeb2c70a0e4044bbbf2e73d1ca8470c403a9763664 /guides
parent88b12b2f605b5fbeefdfb4da7e6141de5b85a18f (diff)
downloadrails-46e84d5b104ca5dca88829c9db7941f0e6ce7aaa.tar.gz
rails-46e84d5b104ca5dca88829c9db7941f0e6ce7aaa.tar.bz2
rails-46e84d5b104ca5dca88829c9db7941f0e6ce7aaa.zip
Return parameters enumerator from transform_keys/!
Previously calling `ActionController::Parameters#transform_keys/!` without passing a block would return an enumerator for the underlying hash, which was inconsistent with the behaviour when a block was passed: ActionController::Parameters.new(foo: "bar").transform_keys { |k| k } => <ActionController::Parameters {"foo"=>"bar"} permitted: false> ActionController::Parameters.new(foo: "bar").transform_keys.each { |k| k } => {"foo"=>"bar"} An enumerator for the parameters is now returned instead, ensuring that evaluating it produces another parameters object instead of a hash: ActionController::Parameters.new(foo: "bar").transform_keys.each { |k| k } => <ActionController::Parameters {"foo"=>"bar"} permitted: false>
Diffstat (limited to 'guides')
0 files changed, 0 insertions, 0 deletions