blob: 5e971a0a6f6febc4beb1a689ea0b920ad57702b1 (
plain)
1
2
3
4
5
6
|
class TargetAllocation < ApplicationRecord
belongs_to :target, inverse_of: :target_allocations, touch: true
belongs_to :nutrient_profile
validates :percentage, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 100 }
end
|