Class: WorldDb::Model::Metro

Inherits:
CityBase
  • Object
show all
Defined in:
lib/worlddb/models/city.rb,
lib/worlddb/models/forward.rb

Instance Method Summary collapse

Methods inherited from CityBase

#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

#citiesObject

note: metro might be part of more than one (two,three) states (thus, cannot belong_to state)

collect (all) states from cities??


36
# File 'lib/worlddb/models/city.rb', line 36

has_many   :cities, class_name: 'City',  foreign_key: 'metro_id'

#place_kindObject

use place_kind_of_code ??



38
39
40
# File 'lib/worlddb/models/city.rb', line 38

def place_kind   # use place_kind_of_code ??
  'MTRO'
end