Params is saved like HashWithIndifferentAccess

Hi I have an application in rails 3. I have a field birthplace that have multiple value city in italy and city in german and i store all in one field. So this is my html

<input  type="text" size="25" name="person[birthplace[it]]"
id="person_birthplace[it]" value="" >

<input  type="text" size="25" name="person[birthplace[de]]"
id="person_birthplace[de]" value="" >

so my params are

“person”=>{“birthplace”=>{“it”=>“Padova”, “de”=>“Padovan”}},
“commit”=>“Create Person”, “action”=>“create”, “controller”=>“people”}

but the data is stored in the field birthplace like

— !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nit: Padova\nde:

if i put in my model

serialize :birthplace, Hash

the data is stored correctly but with default serialization that i think is yaml not working and i have HashWithIndifferentAccess why?

I want to save like

—\nit: Padova\nde: Padovan\n

Have you tried using


Thank, but is not the solution…I search a method to store multiple param like string in this format

—\nit: Padova\nde: Padovan\n

but now i have the error

— !ruby/hash:ActiveSupport::HashWithIndifferentAccess and not in hash format