Sha256: cce16422af01c1d528fcefd0884a9d14d2f2a387b338494e4da69974534d0282

Contents?: true

Size: 642 Bytes

Versions: 6

Compression:

Stored size: 642 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, :foreign_key => :electric_utility_eia_id
  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

6 entries across 6 versions & 1 rubygems

Version Path
earth-0.12.4 lib/earth/electricity/electric_utility.rb
earth-0.12.3 lib/earth/electricity/electric_utility.rb
earth-0.12.2 lib/earth/electricity/electric_utility.rb
earth-0.12.1 lib/earth/electricity/electric_utility.rb
earth-0.12.0 lib/earth/electricity/electric_utility.rb
earth-0.11.20 lib/earth/electricity/electric_utility.rb