Sha256: ea202a8f7b7d8656f43c279923afe32b167f15782808cab07847422cb350da38
Contents?: true
Size: 568 Bytes
Versions: 9
Compression:
Stored size: 568 Bytes
Contents
module UsdaNutrientDatabase class Footnote < ActiveRecord::Base self.table_name = 'usda_footnotes' validates :nutrient_databank_number, presence: true, uniqueness: { allow_blank: true } validates :footnote_number, presence: true validates :footnote_type, presence: true validates :footnote_text, presence: true belongs_to :food, class_name: 'UsdaNutrientDatabase::Food', foreign_key: :nutrient_databank_number belongs_to :nutrient, class_name: 'UsdaNutrientDatabase::Nutrient', foreign_key: :nutrient_number end end
Version data entries
9 entries across 9 versions & 1 rubygems