thecodecrate / city-state

Simple ruby gem to create form lists with cities and states
MIT License
306 stars 135 forks source link

How to get all cities of :us #16

Open amolpujari opened 8 years ago

amoludage commented 8 years ago

Hi @amolpujari

To get list of cities there is method available CS.cities(state, country) So to find cities for US you have to pass state & country to the CS.cities method

Example: CS.cities(:ak, :us) Here :ak is the Alaska state from US. This will return cities from Alaska state of US

There is one alternative available for CS.cities method, i.e CS.get(country, state) this will return same result like the CS.cities method.

Hope this will help you. Thanks