Sha256: e611bc745b4f6d7f47f21c69333af24e3b004d0372518151df1e5f4216c34992

Contents?: true

Size: 660 Bytes

Versions: 9

Compression:

Stored size: 660 Bytes

Contents

class ZipCode < ActiveRecord::Base
  set_primary_key :name
  
  belongs_to :egrid_subregion,  :foreign_key => 'egrid_subregion_abbreviation'
  belongs_to :climate_division, :foreign_key => 'climate_division_name'
  belongs_to :state,            :foreign_key => 'state_postal_abbreviation'
  
  def country
    Country.united_states
  end
  
  acts_as_mappable :default_units => :kilometres,
                   :lat_column_name => :latitude,
                   :lng_column_name => :longitude
  
  col :name
  col :state_postal_abbreviation
  col :description
  col :latitude
  col :longitude
  col :egrid_subregion_abbreviation
  col :climate_division_name
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
earth-0.11.7 lib/earth/locality/zip_code.rb
earth-0.11.6 lib/earth/locality/zip_code.rb
earth-0.11.5 lib/earth/locality/zip_code.rb
earth-0.11.4 lib/earth/locality/zip_code.rb
earth-0.11.3 lib/earth/locality/zip_code.rb
earth-0.11.2 lib/earth/locality/zip_code.rb
earth-0.11.1 lib/earth/locality/zip_code.rb
earth-0.11.0 lib/earth/locality/zip_code.rb
earth-0.7.0 lib/earth/locality/zip_code.rb