Sha256: 51890d8af6e53e89c60dc3c0eecfcba10008bf7099594631247a2d1ee740a082

Contents?: true

Size: 690 Bytes

Versions: 17

Compression:

Stored size: 690 Bytes

Contents

class State < ActiveRecord::Base
  set_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
  col :petroleum_administration_for_defense_district_code
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
earth-0.11.8 lib/earth/locality/state.rb
earth-0.11.7 lib/earth/locality/state.rb
earth-0.11.6 lib/earth/locality/state.rb
earth-0.11.5 lib/earth/locality/state.rb
earth-0.11.4 lib/earth/locality/state.rb
earth-0.11.3 lib/earth/locality/state.rb
earth-0.11.2 lib/earth/locality/state.rb
earth-0.11.1 lib/earth/locality/state.rb
earth-0.11.0 lib/earth/locality/state.rb
earth-0.7.0 lib/earth/locality/state.rb
earth-0.6.6 lib/earth/locality/state.rb
earth-0.6.5 lib/earth/locality/state.rb
earth-0.6.4 lib/earth/locality/state.rb
earth-0.6.3 lib/earth/locality/state.rb
earth-0.6.2 lib/earth/locality/state.rb
earth-0.6.1 lib/earth/locality/state.rb
earth-0.6.0 lib/earth/locality/state.rb