Sha256: f387b8081f455d12a97263715955b3612275cfc3d96b5e50a8ae78eca2349112

Contents?: true

Size: 611 Bytes

Versions: 10

Compression:

Stored size: 611 Bytes

Contents

class DietClass < ActiveRecord::Base
  self.primary_key = "name"
  
  class << self
    def fallback
      find_by_name 'standard'
    end
  end
  
  col :name
  col :intensity, :type => :float
  col :intensity_units
  col :red_meat_share, :type => :float
  col :poultry_share, :type => :float
  col :fish_share, :type => :float
  col :eggs_share, :type => :float
  col :nuts_share, :type => :float
  col :dairy_share, :type => :float
  col :cereals_and_grains_share, :type => :float
  col :fruit_share, :type => :float
  col :vegetables_share, :type => :float
  col :oils_and_sugars_share, :type => :float
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
earth-0.11.20 lib/earth/diet/diet_class.rb
earth-0.11.19 lib/earth/diet/diet_class.rb
earth-0.11.18 lib/earth/diet/diet_class.rb
earth-0.11.17 lib/earth/diet/diet_class.rb
earth-0.11.16 lib/earth/diet/diet_class.rb
earth-0.11.15 lib/earth/diet/diet_class.rb
earth-0.11.14 lib/earth/diet/diet_class.rb
earth-0.11.13 lib/earth/diet/diet_class.rb
earth-0.11.12 lib/earth/diet/diet_class.rb
earth-0.11.11 lib/earth/diet/diet_class.rb