provides all chinese regions, cities and districts
Pull request Compare This branch is even with flyerhzm:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
generators
lib
tasks
test
MIT-LICENSE
README.textile
Rakefile
init.rb
install.rb
uninstall.rb

README.textile

ChineseRegions

Provides all chinese regions, cities and districts


INSTALL


script/plugin install git://github.com/flyerhzm/chinese_regions.git
rake db:migrate

USAGE


Region.all => ['北京市', '山东省', '广西壮族自治区', ...]
City.all => ['北京市', '杭州市', '上海市', ...]
District.all => ['西城区', '静安区', '西湖区', ...]
Region.find(11).cities => ['杭州市', '宁波市', '温州市', ...]
City.find(73).districts => ['黄浦区','卢湾区', '徐汇区', ...]

Copyright © 2009 Richard Huang (flyerhzm@gmail.com), released under the MIT license