Sha256: 4dfbd2c30f2f191ef330cc03c7b29d685b6fbc2fa1177c45e2f2cb8fc945e3fa

Contents?: true

Size: 321 Bytes

Versions: 74

Compression:

Stored size: 321 Bytes

Contents

class FoodGroup < ActiveRecord::Base
  set_primary_key :name

  class << self
    def names
      connection.select_values arel_table.project(:name).to_sql
    end
    
    def [](name)
      find_by_name name.to_s
    end
  end
  
  data_miner do
    tap "Brighter Planet's food group data", Earth.taps_server
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
earth-0.5.0 lib/earth/diet/food_group.rb
earth-0.4.12 lib/earth/diet/food_group.rb
earth-0.4.11 lib/earth/diet/food_group.rb
earth-0.4.10 lib/earth/diet/food_group.rb
earth-0.4.9 lib/earth/diet/food_group.rb
earth-0.4.8 lib/earth/diet/food_group.rb
earth-0.4.7 lib/earth/diet/food_group.rb
earth-0.4.6 lib/earth/diet/food_group.rb
earth-0.4.5 lib/earth/diet/food_group.rb
earth-0.4.4 lib/earth/diet/food_group.rb
earth-0.4.3 lib/earth/diet/food_group.rb
earth-0.4.2 lib/earth/diet/food_group.rb
earth-0.4.1 lib/earth/diet/food_group.rb
earth-0.4.0 lib/earth/diet/food_group.rb
earth-0.3.15 lib/earth/diet/food_group.rb
earth-0.3.14 lib/earth/diet/food_group.rb
earth-0.3.13 lib/earth/diet/food_group.rb
earth-0.3.11 lib/earth/diet/food_group.rb
earth-0.3.10 lib/earth/diet/food_group.rb
earth-0.3.9 lib/earth/diet/food_group.rb