Sha256: ca33b0c6c132812cca6deb357246255874404f4bf082c02edccf83e4f9e5ec12
Contents?: true
Size: 635 Bytes
Versions: 7
Compression:
Stored size: 635 Bytes
Contents
require 'earth/model' class GreenhouseGas < ActiveRecord::Base extend Earth::Model TABLE_STRUCTURE = <<-EOS CREATE TABLE greenhouse_gases ( name CHARACTER VARYING(255) NOT NULL PRIMARY KEY, abbreviation CHARACTER VARYING(255), ipcc_report CHARACTER VARYING(255), time_horizon INTEGER, time_horizon_units CHARACTER VARYING(255), global_warming_potential INTEGER ); EOS self.primary_key = "name" class << self def [](abbreviation) find_by_abbreviation abbreviation.to_s end end warn_unless_size 4 end
Version data entries
7 entries across 7 versions & 1 rubygems