Sha256: 172d7d7f0a8358ab169144c409b3be7453d8640cd2a748007c4975d75aec7ede
Contents?: true
Size: 603 Bytes
Versions: 7
Compression:
Stored size: 603 Bytes
Contents
require 'earth/model' require 'earth/electricity/electric_utility' require 'earth/locality/zip_code' class ElectricMarket < ActiveRecord::Base extend Earth::Model TABLE_STRUCTURE = <<-EOS CREATE TABLE electric_markets ( id CHARACTER VARYING(255) NOT NULL PRIMARY KEY, electric_utility_eia_id INTEGER, zip_code_name CHARACTER VARYING(255) ); EOS self.primary_key = "id" # string belongs_to :electric_utility, :foreign_key => 'electric_utility_eia_id' belongs_to :zip_code, :foreign_key => 'zip_code_name' warn_unless_size 64864 end
Version data entries
7 entries across 7 versions & 1 rubygems