arvindvyas / Country-State-Select

It will fetch the countries and according to that fetch the state of that countries, currently it is for countries listing
MIT License
69 stars 78 forks source link

How to save country, state or city name instead of code? #58

Closed b3ccio closed 5 years ago

b3ccio commented 5 years ago

This is probably an obvious question, but I don't see it in the readme. How would I save a country's name instead of the code? It seems to only allow an _id.

arvindvyas commented 5 years ago

It's not good to save direct country name due to conflict issue but if you still want those you can use a pre-define method which is already in this gem and make your own select

CountryStateSelect.countries_collection
CountryStateSelect.states_collection(f, options)