each_value

The params hash remains unchanged because the 'value' variable is
local to that loop, so it doesn't change anything outside the loop
(such as the params). It changes the 'value' variable, but not the
params variable. In order to change the params, you need to directly
reference them in the loop, something like

params[:person].each{|k,v| params[:person][k] = '%' + v + '%'}