Includes all the states (nomous) of Greece and their biggest cities, displayed in greek. Easy way to populate Rails forms with greek cities.
# Rails
gem 'greek-cities'
# Ruby
gem install 'greek-cities'
require 'gc'
GC.states
# => [["Αιτωλοακαρνανίας", "ait"], ["Αργολίδας", "arg"], ["Αρκαδίας", "ark"]...
Returns all the states with their corresponding codes.
GC.cities("arg")
# => [["Άργος - Μυκήνες", "argos-mikines-ARG"], ["Επίδαυρος", "epidavros-ARG"], ["Κρανίδι", "kranidi-ARG"], ["Ναύπλιο", "nafplio-ARG"]]
GC.get_state_name('ait')
# => "Αιτωλοακαρνανίας"
GC.get_city_name('att', 'holargos-ATT')
# => "Χολαργός"
Enter a state code as an argument. It's not case sensitive, you could enter "ARG".
<%= options_for_select GC.states %>
# output:
<option value="ait">Αιτωλοακαρνανίας</option>
<option value="arg">Αργολίδας</option>
...
<%= options_for_select GC.cities('arg')%>
# output:
<option value="argos-mikines-ARG">Άργος - Μυκήνες</option>
<option value="epidavros-ARG">Επίδαυρος</option>
...
greek-cities is an open source project by Alex Avlonitis with an MIT license.