Sha256: 5a3ea906a083291b2bc07de6df2affb01a5c824482e4e6a821e5a4116ff8b610

Contents?: true

Size: 727 Bytes

Versions: 25

Compression:

Stored size: 727 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
  
  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

25 entries across 25 versions & 1 rubygems

Version Path
earth-0.5.0 lib/earth/locality/zip_code.rb
earth-0.4.12 lib/earth/locality/zip_code.rb
earth-0.4.11 lib/earth/locality/zip_code.rb
earth-0.4.10 lib/earth/locality/zip_code.rb
earth-0.4.9 lib/earth/locality/zip_code.rb
earth-0.4.8 lib/earth/locality/zip_code.rb
earth-0.4.7 lib/earth/locality/zip_code.rb
earth-0.4.6 lib/earth/locality/zip_code.rb
earth-0.4.5 lib/earth/locality/zip_code.rb
earth-0.4.4 lib/earth/locality/zip_code.rb
earth-0.4.3 lib/earth/locality/zip_code.rb
earth-0.4.2 lib/earth/locality/zip_code.rb
earth-0.4.1 lib/earth/locality/zip_code.rb
earth-0.4.0 lib/earth/locality/zip_code.rb
earth-0.3.15 lib/earth/locality/zip_code.rb
earth-0.3.14 lib/earth/locality/zip_code.rb
earth-0.3.13 lib/earth/locality/zip_code.rb
earth-0.3.11 lib/earth/locality/zip_code.rb
earth-0.3.10 lib/earth/locality/zip_code.rb
earth-0.3.9 lib/earth/locality/zip_code.rb