I am trying to manage the country names with i18n. I have a countries table with the countries extension codes (us., co., ve., .bo. etc...) and the yml files with their complete names:
en: countries: ar: Argentina co: Colombia .
I am trying to make a form with a select option for country and came up with this:
<%= f.select("country_id", Country.all.collect {|p| [ t ('countries.'+p.code), p.id ] }, { :include_blank => true }) %>
Can anyone tell is this a clean way to do this or is there another way, maybe using collection_select. Thanks,
Elías