Class: AutomobileActivityYearTypeFuel
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AutomobileActivityYearTypeFuel
- Extended by:
- Earth::Model
- Defined in:
- lib/earth/automobile/automobile_activity_year_type_fuel.rb
Constant Summary collapse
- TABLE_STRUCTURE =
<<-EOS CREATE TABLE automobile_activity_year_type_fuels ( name CHARACTER VARYING(255) NOT NULL PRIMARY KEY, activity_year INTEGER, type_name CHARACTER VARYING(255), fuel_family CHARACTER VARYING(255), distance FLOAT, distance_units CHARACTER VARYING(255), fuel_consumption FLOAT, fuel_consumption_units CHARACTER VARYING(255) ); EOS
Class Method Summary collapse
-
.latest ⇒ Object
Used by AutomobileFuel to get records from latest activity year.
Methods included from Earth::Model
extend_mining, extended, registry
Class Method Details
.latest ⇒ Object
Used by AutomobileFuel to get records from latest activity year
25 26 27 |
# File 'lib/earth/automobile/automobile_activity_year_type_fuel.rb', line 25 def self.latest where :activity_year => maximum(:activity_year) end |