parsley/app/models/recipe_ingredient.rb

10 lines
232 B
Ruby
Raw Normal View History

2016-01-12 18:43:00 -06:00
class RecipeIngredient < ActiveRecord::Base
belongs_to :ingredient
2016-01-13 17:10:43 -06:00
belongs_to :recipe, inverse_of: :recipe_ingredients
validates :sort_order, presence: true
2016-01-14 15:22:15 -06:00
validates :custom_density, density: true, allow_blank: true
2016-01-12 18:43:00 -06:00
end