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

Version Path
dusen-0.5 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.11 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.10 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.9 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.8 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.6 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.5 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.4 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.3 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.2 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.1 spec/shared/app_root/app/models/recipe.rb
dusen-0.4.0 spec/shared/app_root/app/models/recipe.rb
dusen-0.3.0 spec/shared/app_root/app/models/recipe.rb