Sha256: 32d0d16c2997249adcb6017a690bab07d609b5dc6ad6cc7c8910c384d2a7b686

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

require 'earth/locality'

class ElectricUtility < ActiveRecord::Base
  self.primary_key = "eia_id"
  
  belongs_to :state, :foreign_key => 'state_postal_abbreviation'
  has_many :electric_markets
  has_many :zip_codes, :through => :electric_markets
  
  col :eia_id, :type => :integer
  col :name
  col :nickname
  col :state_postal_abbreviation
  col :nerc_region_abbreviation
  col :second_nerc_region_abbreviation

  def green_button_implementer?
    GreenButtonAdoption.implemented? name, nickname 
  end

  def green_button_committer?
    GreenButtonAdoption.committed? name, nickname
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
earth-0.11.19 lib/earth/electricity/electric_utility.rb