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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to