Sha256: bd9f21e9096a7d8924105f05b156b91736a04171cbfbe783303c48defd52f1b2
Contents?: true
Size: 342 Bytes
Versions: 13
Compression:
Stored size: 342 Bytes
Contents
class Recipe < ActiveRecord::Base validates_presence_of :name has_many :ingredients, :class_name => 'Recipe::Ingredient', :inverse_of => :recipe belongs_to :category, :class_name => 'Recipe::Category', :inverse_of => :recipes search_syntax search_text do [name, category.andand.name, ingredients.collect(&:name)] end end
Version data entries
13 entries across 13 versions & 1 rubygems