Sha256: f3ad8d5199559ee5c1b7394b58d1c554c9e25c5fd318fc7417a29edb57cd4162
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
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' has_one :census_region, :through => :census_division belongs_to :petroleum_administration_for_defense_district, :foreign_key => 'petroleum_administration_for_defense_district_code' 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 col :population, :type => :integer col :electricity_emission_factor, :type => :float col :electricity_emission_factor_units col :electricity_loss_factor, :type => :float warn_if_nulls_except( :census_division_number, :petroleum_administration_for_defense_district_code ) warn_unless_size 57 end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
earth-0.12.3 | lib/earth/locality/state.rb |
earth-0.12.2 | lib/earth/locality/state.rb |
earth-0.12.1 | lib/earth/locality/state.rb |
earth-0.12.0 | lib/earth/locality/state.rb |