Sha256: 7d2faf26fe2ab6d08bc24a9d33557e1ce98655e3cff13d934920d97958e804c3

Contents?: true

Size: 693 Bytes

Versions: 2

Compression:

Stored size: 693 Bytes

Contents

require 'earth/locality'
class ResidenceFuelPrice < ActiveRecord::Base
  self.primary_key = "row_hash"
  
  extend CohortScope
  self.minimum_cohort_size = 5 # ? FIXME
  
  belongs_to :fuel, :class_name => 'ResidenceFuelType', :foreign_key => 'residence_fuel_type_name'
  belongs_to :locatable, :polymorphic => true
  
  col :row_hash
  col :residence_fuel_type_name
  col :year, :type => :integer
  col :month, :type => :integer
  col :price, :type => :float
  col :price_units
  col :price_description
  col :locatable_id
  col :locatable_type
  add_index [:price, :residence_fuel_type_name, :month, :year, :locatable_type, :locatable_id]
  add_index [:price, :residence_fuel_type_name]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
earth-0.11.12 lib/earth/residence/residence_fuel_price.rb
earth-0.11.11 lib/earth/residence/residence_fuel_price.rb