Sha256: de7ccca570a7d1991919150f8f639ac28e4b7ecd49d5dca25a6f22fa70d52591

Contents?: true

Size: 716 Bytes

Versions: 2

Compression:

Stored size: 716 Bytes

Contents

class State < ActiveRecord::Base
  self.primary_key = "postal_abbreviation"
  
  has_many :climate_divisions, :foreign_key => 'state_postal_abbreviation'
  has_many :zip_codes, :foreign_key => 'state_postal_abbreviation'
  belongs_to :census_division, :foreign_key => 'census_division_number'
  belongs_to :petroleum_administration_for_defense_district, :foreign_key => 'petroleum_administration_for_defense_district_code'
  has_one :census_region, :through => :census_division
  
  def country
    Country.united_states
  end
  
  col :postal_abbreviation
  col :fips_code, :type => :integer
  col :name
  col :census_division_number, :type => :integer
  col :petroleum_administration_for_defense_district_code
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
earth-0.11.12 lib/earth/locality/state.rb
earth-0.11.11 lib/earth/locality/state.rb