rails/rails — pull request #12656 by dougcole (2013-10-27 02:32:11+00:00)
Title: don't let StrongParameters mutate the hash with fetch

right now `.fetch` just dispatches to `convert_hashes_to_parameters` which if given an empty hash as the default and the key doesn't exist mutates the hash, setting setting the given default value as the new value. This is a significant change from what `Hash#fetch` does.

Big thanks to @bemurphy, whose implementation I stole from here: https://github.com/rails/strong_parameters/pull/102/files