Sha256: af2131f2134884f6c07f0c2231bf600cc9a23d29975ab24afbfd74c22dd9173f

Contents?: true

Size: 751 Bytes

Versions: 21

Compression:

Stored size: 751 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'
#  has_one :census_division, :through => :state
#  has_one :census_region, :through => :state
  has_many :residences

  
  acts_as_mappable :default_units => :miles,  # FIXME imperial
                   :lat_column_name => :latitude,
                   :lng_column_name => :longitude

  data_miner do
    tap "Brighter Planet's sanitized zip codes", Earth.taps_server
    
    process "pull dependencies" do
      run_data_miner_on_belongs_to_associations
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
earth-0.3.3 lib/earth/locality/zip_code.rb
earth-0.3.2 lib/earth/locality/zip_code.rb
earth-0.3.1 lib/earth/locality/zip_code.rb
earth-0.3.0 lib/earth/locality/zip_code.rb
earth-0.2.14 lib/earth/locality/zip_code.rb
earth-0.2.13 lib/earth/locality/zip_code.rb
earth-0.2.12 lib/earth/locality/zip_code.rb
earth-0.2.11 lib/earth/locality/zip_code.rb
earth-0.2.9 lib/earth/locality/zip_code.rb
earth-0.2.8 lib/earth/locality/zip_code.rb
earth-0.2.7 lib/earth/locality/zip_code.rb
earth-0.2.6 lib/earth/locality/zip_code.rb
earth-0.2.5 lib/earth/locality/zip_code.rb
earth-0.2.4 lib/earth/locality/zip_code.rb
earth-ruby19-0.2.3 lib/earth/locality/zip_code.rb
earth-0.2.3 lib/earth/locality/zip_code.rb
earth-0.2.2 lib/earth/locality/zip_code.rb
earth-0.2.1 lib/earth/locality/zip_code.rb
earth-0.2.0 lib/earth/locality/zip_code.rb
earth-0.1.4 lib/earth/locality/zip_code.rb