Sha256: 4b571a97538aa245a60abd313673f2c5f7b36859d72948a19fbef38c3f330dac
Contents?: true
Size: 402 Bytes
Versions: 10
Compression:
Stored size: 402 Bytes
Contents
class FoodGroup < ActiveRecord::Base self.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 col :name col :intensity, :type => :float col :intensity_units col :energy, :type => :float col :energy_units col :suggested_imperial_measurement # ? end
Version data entries
10 entries across 10 versions & 1 rubygems