Country State Select is a library that provides a simple API for creating Country and State / Province drop-down lists for use in forms.
When implemented correctly, the State / Province drop-down menu is populated with the appropriate regions depending on the country that the user has selected.
After version 2.0.0 it also depends on simple_form 3.2
you can also find cities according to the state and name of the country using this gem
https://rubygems.org/gems/country_state_select
source share