I have built a form tag and gotten values selected from a user. This is what I get:
params[:user_answer_ids] = {"170"=>["599"], "162"=>["561", "563", "565"], "160"=>["549", "550"]}
Now I want to convert all string in this hash to int, like:
params[:user_answer_ids] = {170=>[599], 162=>[561, 563, 565], 160=>[549, 550]}
I want to convert to int because I want to compare question and answer ids later. Currently I have to use to_i method when looping in a hash, so I want to know whether there is any way to convert all string to int at once.