Sha256: 1bed23bafe8a71510d6cb77dc7580d049456e17fc065af0b1e243d8482410d66
Contents?: true
Size: 427 Bytes
Versions: 1
Compression:
Stored size: 427 Bytes
Contents
## # Town 是中国的乡或者镇。 class Unidom::Geo::China::Town < Unidom::Geo::China::ApplicationRecord self.table_name = 'unidom_china_towns' include Unidom::Common::Concerns::ModelExtension validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit } belongs_to :region, class_name: 'Unidom::Geo::China::Region' scope :region_is, ->(region) { where region_id: to_id(region) } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unidom-geo-china-0.4.5 | app/models/unidom/geo/china/town.rb |