Actions
Feature #13583
closedAdding `Hash#transform_keys` method
Feature #13583:
Adding `Hash#transform_keys` method
Description
In 2.4, new useful method Hash#transform_values was added. I would like to propose also adding matching method Hash#transform_keys.
What needs to be considered is what to do in case of two keys mapping to the same new key
I think using Hash[] as model behaviour is a good idea.
it's also how Hash#transform_keys works in rails (afaict).
This is a follow up feature request to #9970, which seems to be stalled. If the behaviour can be agreed upon, I can try putting together a patch (if no one else wants to step up).
Actions