Class: Cats::Core::Beneficiary

Inherits:
ApplicationRecord show all
Defined in:
app/models/cats/core/beneficiary.rb

Constant Summary collapse

MALE =
"M".freeze
FEMALE =
"F".freeze
GENDERS =
[MALE, FEMALE].freeze

Instance Method Summary collapse

Instance Method Details

#validate_fdpObject



19
20
21
22
23
# File 'app/models/cats/core/beneficiary.rb', line 19

def validate_fdp
  return unless fdp

  errors.add(:fdp, "should be a valid distribution point.") unless fdp.location_type == Location::FDP
end