Personal speech,
I have a GROUP_TV table and it relates to the City table through the has many through.
In the _from.html.erb of the GROUP_TV view, I have a collection_select to select as many cities as I want. This works perfectly.
The problem happens when I add the chosen gem and set it to display in that field, it even works, but in the editing page it doubles, for example:
If in the NEW action I selected the cities: Americana and Barueri and saved, in the EDIT action 2 SELECT fields appear with the same values in each, see the print below:
HowcanIresolvethis?
Followtheselectcode
<%=f.collection_select(:city_ids,City.all,:id,:name,{prompt:"Selecione as cidades"}, {:multiple => true, class: "select-chosen"}) %>