Class: ZipCode
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ZipCode
- Extended by:
- Earth::Model
- Defined in:
- lib/earth/locality/zip_code.rb
Constant Summary collapse
- TABLE_STRUCTURE =
"\nCREATE TABLE zip_codes\n (\n name CHARACTER VARYING(255) NOT NULL PRIMARY KEY,\n state_postal_abbreviation CHARACTER VARYING(255),\n description CHARACTER VARYING(255),\n latitude CHARACTER VARYING(255),\n longitude CHARACTER VARYING(255),\n egrid_subregion_abbreviation CHARACTER VARYING(255),\n climate_division_name CHARACTER VARYING(255),\n population INTEGER\n );\n\n"
Instance Method Summary collapse
- #country ⇒ Object
-
#latitude_longitude ⇒ Object
Used by LodgingProperty custom find to find properties near to a zip code.
Methods included from Earth::Model
extend_mining, extended, registry
Instance Method Details
#country ⇒ Object
47 48 49 |
# File 'lib/earth/locality/zip_code.rb', line 47 def country Country.united_states end |
#latitude_longitude ⇒ Object
Used by LodgingProperty custom find to find properties near to a zip code
52 53 54 |
# File 'lib/earth/locality/zip_code.rb', line 52 def latitude_longitude [latitude, longitude] end |