Rails 4 - i18n country_select

I was trying to inject country_select into my application so that the user can select a country during the registration process (development).

I want the list of countries to translate based on the user's locale. Actually it has been translated into several languages

This is the i18n-country-translations gem , which contains a list of countries in different languages. How do I implement these translations when I am trying to select countries?

I also found another gem from the same author, i18n_country_select . But when I try to use it like this:

<%= f.country_code_select(:user, :country) %>

      

I am getting the error:

undefined method 'to_country_code_select_tag' for #<ActionView::Helpers::Tags::Select:0x007f182d81abe0>

      

+3


source to share


1 answer


You tried



    f.country_select (:user, :country_code) 

      

0


source







All Articles