Sha256: 2fc92351b58b50ed6957171eb3ab8bffc676b2a3843b8ca753a27740fab520ea
Contents?: true
Size: 1.69 KB
Versions: 3
Compression:
Stored size: 1.69 KB
Contents
require 'earth/fuel' class AutomobileMakeModelYearVariant < ActiveRecord::Base set_primary_key :row_hash # It looks like synthesizing a unique name would require including pretty much every column from the FEGs # (e.g. creeper gear, automatic vs automatic with lockup, feedback fuel system, etc.) # The advantages of not keying on row_hash is we could update variants to note whether they're hybrid or not and # it would let users specify variants. But my conclusion is that trying to do this won't be much of an improvement # because it will be a bunch of work to include all the columns and the names will be really long and obtuse # -Ian 10/18/2011 col :row_hash col :make_name col :model_name col :year, :type => :integer col :transmission col :speeds col :drive col :fuel_code col :cylinders, :type => :integer col :displacement, :type => :float col :turbo, :type => :boolean col :supercharger, :type => :boolean col :injection, :type => :boolean col :fuel_efficiency, :type => :float col :fuel_efficiency_units col :fuel_efficiency_city, :type => :float col :fuel_efficiency_city_units col :fuel_efficiency_highway, :type => :float col :fuel_efficiency_highway_units col :raw_fuel_efficiency_city, :type => :float col :raw_fuel_efficiency_city_units col :raw_fuel_efficiency_highway, :type => :float col :raw_fuel_efficiency_highway_units col :carline_mfr_code, :type => :integer col :vi_mfr_code, :type => :integer col :carline_code, :type => :integer col :carline_class_code, :type => :integer col :carline_class_name add_index :make_name add_index :model_name add_index :year end
Version data entries
3 entries across 3 versions & 1 rubygems