diff --git a/app/models/case_log.rb b/app/models/case_log.rb index ee325522a..347973077 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -482,15 +482,26 @@ private end def get_housingneeds + return 1 if has_housingneeds? + return 2 if no_housingneeds? + return 3 if unknown_housingneeds? + end + + def has_housingneeds? if [housingneeds_a, housingneeds_b, housingneeds_c, housingneeds_f].any?(1) - return 1 + 1 end + end + + def no_housingneeds? if housingneeds_g == 1 - return 2 + 1 end + end + def unknown_housingneeds? if housingneeds_h == 1 - 3 + 1 end end