README.md in unidom-geo-china-0.4.5 vs README.md in unidom-geo-china-0.4.6
- old
+ new
@@ -1,8 +1,10 @@
# Unidom Geo China 中国地理领域模型引擎
+[](http://www.rubydoc.info/gems/unidom-geo-china/frames)
[](http://opensource.org/licenses/MIT)
+
[](https://badge.fury.io/rb/unidom-geo-china)
[](https://gemnasium.com/github.com/topbitdu/unidom-geo-china)
Unidom (UNIfied Domain Object Model) is a series of domain model engines. The China Geo domain model engine includes the Region model and its migration.
Unidom (统一领域对象模型)是一系列的领域模型引擎。中国地理领域模型引擎包括中国大陆的行政区划模型及其数据迁移脚本。
@@ -55,11 +57,11 @@
The Region model has a lot of domain knowlegde of the China regions.
- ```region.numeric_code_middle_empty?``` indicates whether the ```region``` is a province. 判断行政区划是否是一个省、直辖市、或者自治区。
- ```!region.numeric_code_middle_empty?&®ion.numeric_code_suffix_empty?``` indicates whether the ```region``` is a city. 判断行政区划是否是一个地级市、地区、自治州、盟。
- ```!region..numeric_code_suffix_empty?``` indicates whether the ```region``` is a county. 判断行政区划是否是一个自治县、县级市、旗、自治旗、市辖区、林区、特区。
- ```region.mducg?``` indicates whether the ```region``` is a municipality direct under central government. 判断行政区划是否是一个直辖市。
--
+-
```region.under_mducg?``` indicates whether the ```region``` is under any municipality direct under central government. 判断行政区划是否是一个直辖市的下级行政区划。
- ```region.under? another_region``` indicates the ```region``` is under the given another_region. 判断行政区划是否是一个给定行政区划的下级(含直接和间接下级)。
- ```region.super_regions``` returns a scope for the super regions of the ```region```. 返回找到 ```region``` 直接上级行政区划的查询 scope。
- ```region.sub_regions``` returns a scope for the sub regions of the ```region```. 返回找到 ```region``` 直接下级行政区划的查询 scope。
@@ -72,12 +74,28 @@
include Unidom::Geo::China::Concerns::AsSuperiorRegion
```
### As Inferior Region
-The As Inferior Region do the following tasks for the includer automatically:
+The As Inferior Region do the following tasks for the includer automatically:
1. Define the #super_regions method as: ``super_regions``
### As Superior Region
-The As Superior Region do the following tasks for the includer automatically:
+The As Superior Region do the following tasks for the includer automatically:
1. Define the #sub_regions method as: ``sub_regions``
+
+
+
+## Disable the Model & Migration
+
+If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
+```ruby
+# config/initializers/unidom.rb
+Unidom::Common.configure do |options|
+
+ options[:neglected_namespaces] = %w{
+ Unidom::Geo::China
+ }
+
+end
+```