Browse Source

Merge pull request #1 from bater/master

文字細節修正
Marker 7 years ago
parent
commit
4728897e32
2 changed files with 32 additions and 31 deletions
  1. 4 3
      README.md
  2. 28 28
      db/areas.json

+ 4 - 3
README.md

@@ -6,7 +6,7 @@
 
 请留意,Rails3.1 与 Ruby2.0 不兼容,sprockets 无法正常解析 application.js,请使用 Ruby1.9。
 
-## 
+## 
 
 这是一个基于 Rails Engine 开发的插件,為 Rails 專案增加縣,市區二級下拉列表。
 
@@ -40,7 +40,8 @@
 
 请留意:所有选择框都要有 `city-select` class,并都包含于 class='city-group' 的 DOM 元素之下。
 
-選擇後的值前2碼為個人自行編碼,後3碼為台灣的郵遞區號。
+選擇後的值前2碼為個人自行編碼,後3碼為台灣的郵遞區號,可使用 `TaiwanCity.get('01100')` 將代碼轉換為城市名稱。
+
 
 ```
         {"text": "臺北市" ,"id": "01000"},
@@ -66,7 +67,7 @@
         {"text": "離島地區","id": "21000"}
 ```
 
-## 贡献
+## 貢獻
 
 ```bash
 git clone https://github.com/motephyr/taiwan_city.git

+ 28 - 28
db/areas.json

@@ -2,22 +2,22 @@
     "city": [
         {"text": "臺北市","id": "01000"},
         {"text": "新北市","id": "02000"},
-        {"text": "基隆","id": "03000"},
-        {"text": "桃園","id": "04000"},
-        {"text": "新竹","id": "05000"},
-        {"text": "苗栗","id": "06000"},
-        {"text": "台中","id": "07000"},
-        {"text": "彰化","id": "08000"},
-        {"text": "南投","id": "09000"},
-        {"text": "雲林","id": "10000"},
+        {"text": "基隆","id": "03000"},
+        {"text": "桃園","id": "04000"},
+        {"text": "新竹","id": "05000"},
+        {"text": "苗栗","id": "06000"},
+        {"text": "台中","id": "07000"},
+        {"text": "彰化","id": "08000"},
+        {"text": "南投","id": "09000"},
+        {"text": "雲林","id": "10000"},
         {"text": "嘉義","id": "11000"},
-        {"text": "台南","id": "12000"},
-        {"text": "高雄","id": "13000"},
-        {"text": "屏東","id": "14000"},
-        {"text": "宜蘭","id": "15000"},
-        {"text": "花蓮","id": "16000"},
-        {"text": "台東","id": "17000"},
-        {"text": "澎湖","id": "18000"},
+        {"text": "台南","id": "12000"},
+        {"text": "高雄","id": "13000"},
+        {"text": "屏東","id": "14000"},
+        {"text": "宜蘭","id": "15000"},
+        {"text": "花蓮","id": "16000"},
+        {"text": "台東","id": "17000"},
+        {"text": "澎湖","id": "18000"},
         {"text": "金門","id": "19000"},
         {"text": "馬祖","id": "20000"},
         {"text": "離島地區","id": "21000"}
@@ -102,19 +102,19 @@
         {"text": "北埔鄉","id": "05314"},
         {"text": "峨眉鄉","id": "05315"},
 
-        {"text": "中壢","id": "04320"},
-        {"text": "平鎮","id": "04324"},
-        {"text": "龍潭","id": "04325"},
-        {"text": "楊梅","id": "04326"},
-        {"text": "新屋","id": "04327"},
-        {"text": "觀音","id": "04328"},
-        {"text": "桃園","id": "04330"},
-        {"text": "龜山","id": "04333"},
-        {"text": "八德","id": "04334"},
-        {"text": "大溪","id": "04335"},
-        {"text": "復興","id": "04336"},
-        {"text": "大園","id": "04337"},
-        {"text": "蘆竹","id": "04338"},
+        {"text": "中壢","id": "04320"},
+        {"text": "平鎮","id": "04324"},
+        {"text": "龍潭","id": "04325"},
+        {"text": "楊梅","id": "04326"},
+        {"text": "新屋","id": "04327"},
+        {"text": "觀音","id": "04328"},
+        {"text": "桃園","id": "04330"},
+        {"text": "龜山","id": "04333"},
+        {"text": "八德","id": "04334"},
+        {"text": "大溪","id": "04335"},
+        {"text": "復興","id": "04336"},
+        {"text": "大園","id": "04337"},
+        {"text": "蘆竹","id": "04338"},
 
         {"text": "竹南鎮","id": "06350"},
         {"text": "頭份鎮","id": "06351"},