Sha256: 364177717b259024e48ede873c592a9734db3d98d2e352a1cb81f432a9d5918c
Contents?: true
Size: 754 Bytes
Versions: 3
Compression:
Stored size: 754 Bytes
Contents
require 'earth/model' require 'earth/locality/state' require 'earth/locality/zip_code' class ClimateDivision < ActiveRecord::Base extend Earth::Model TABLE_STRUCTURE = <<-EOS CREATE TABLE climate_divisions ( name CHARACTER VARYING(255) NOT NULL PRIMARY KEY, heating_degree_days FLOAT, heating_degree_days_units CHARACTER VARYING(255), cooling_degree_days FLOAT, cooling_degree_days_units CHARACTER VARYING(255), state_postal_abbreviation CHARACTER VARYING(255) ); EOS self.primary_key = "name" has_many :zip_codes, :foreign_key => 'climate_division_name' belongs_to :state, :foreign_key => 'state_postal_abbreviation' RADIUS = 750 warn_unless_size 359 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
earth-1.0.3 | lib/earth/locality/climate_division.rb |
earth-1.0.2 | lib/earth/locality/climate_division.rb |
earth-1.0.1 | lib/earth/locality/climate_division.rb |