Lets say I have a hash which may contain hashes.
params: { :action => "index", :controller => "home",
:secret => "I love Jeff Atwood",
:user => {name => "Steve", secret => "I steal Joel's pants"}}
Is there an elegant way to traverse the hash and remove all the "secret" keys I come across including the subhashes. (The hashes are not restricted so no way to know what the hashes may contain in advance.)
I know I could do
params.delete(:secret)
but that wouldn't get the secret from the 'user' hash.