Sha256: 57aebb4dd5ac09d8bd00cc71f83968e8d7bd332ecaf85fbeb253c643b7dd95d2

Contents?: true

Size: 426 Bytes

Versions: 8

Compression:

Stored size: 426 Bytes

Contents

require 'earth/model'

require 'earth/fuel/fuel_type'

class FuelPrice < ActiveRecord::Base
  extend Earth::Model

  TABLE_STRUCTURE = <<-EOS

CREATE TABLE fuel_prices
  (
     name        CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     price       FLOAT,
     price_units CHARACTER VARYING(255)
  );

EOS

  self.primary_key = "name"
  
  belongs_to :fuel_type, :foreign_key => 'name' # weird
  

  warn_unless_size 34
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/fuel/fuel_price.rb
earth-1.1.2 lib/earth/fuel/fuel_price.rb
earth-1.1.1 lib/earth/fuel/fuel_price.rb
earth-1.1.0 lib/earth/fuel/fuel_price.rb
earth-1.0.3 lib/earth/fuel/fuel_price.rb
earth-1.0.2 lib/earth/fuel/fuel_price.rb
earth-1.0.1 lib/earth/fuel/fuel_price.rb
earth-1.0.0 lib/earth/fuel/fuel_price.rb