I get hash from a fields_for that looks like this:
"affiliation_attributes"=>{
"11"=>{"volunteer_id"=>"14", "affiliationtype_id"=>"1", "organization_id"=>"1"},
"1"=>{"volunteer_id"=>"1", "affiliationtype_id"=>"3", "organization_id"=>"1"},
"4"=>{"volunteer_id"=>"2", "affiliationtype_id"=>"3", "organization_id"=>"1"},
"21"=>{"volunteer_id"=>"20", "affiliationtype_id"=>"1", "organization_id"=>"1"}
The first number ( like the 11 ) is the affiliationtype_id and the values next to it are the attributes of it.
What I want to do is to save all those Affiliationtypes. How can I do that?
Thanks in advance.