Find german city data by zip code.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install zipcode-de
require 'zipcode-de' # use it directly z = ::.new z.load # builds memory-backed global index z.search(:zip, '45289') # exact zip code search # use it through ZipCode::DB ::DB.for(:de).load ::DB.for(:de).search(:zip, '45289')
- Support prefix search
- Support search by name
- Faster indexes
Bug reports and pull requests are welcome on GitHub at https://github.com/timoschilling/zipcode-de.
Data source: OpenStreetMap