Class: WorldDb::Model::County
- Defined in:
- lib/worlddb/models/state.rb,
lib/worlddb/models/forward.rb
Overview
ADM2/ADM3
Instance Method Summary collapse
-
#country_id ⇒ Object
return country_id via top-level (e.g. adm1) state.
-
#part ⇒ Object
optional assoc (used if level=3 and not 2).
- #place_kind ⇒ Object
Methods inherited from StateBase
#all_names, create_or_update_from_attribs, create_or_update_from_values, #on_create, #on_update, parse, #synonyms, #synonyms=, #title, #title=
Methods included from TextUtils::ValueHelper
#is_state?, #match_city, #match_country, #match_metro, #match_metro_flag, #match_metro_pop, #match_state_for_country, #match_supra, #match_supra_flag
Instance Method Details
#country_id ⇒ Object
return country_id via top-level (e.g. adm1) state
51 52 53 |
# File 'lib/worlddb/models/state.rb', line 51 def country_id # return country_id via top-level (e.g. adm1) state state.country_id end |
#part ⇒ Object
optional assoc (used if level=3 and not 2)
44 |
# File 'lib/worlddb/models/state.rb', line 44 belongs_to :part, class_name: 'Part', foreign_key: 'part_id' |
#place_kind ⇒ Object
49 |
# File 'lib/worlddb/models/state.rb', line 49 def place_kind() 'COUN'; end |