|
|
|
@ -433,6 +433,18 @@ class CaseLog < ApplicationRecord
|
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def age_known?(person_num) |
|
|
|
|
return false unless person_num.is_a?(Integer) |
|
|
|
|
|
|
|
|
|
!!public_send("age#{person_num}_known")&.zero? |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def age_unknown?(person_num) |
|
|
|
|
return false unless person_num.is_a?(Integer) |
|
|
|
|
|
|
|
|
|
public_send("age#{person_num}_known") == 1 |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
|
|
PIO = Postcodes::IO.new |
|
|
|
@ -568,10 +580,6 @@ private
|
|
|
|
|
public_send("age#{person_num}") && public_send("age#{person_num}") < 16 |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def age_known?(person_num) |
|
|
|
|
!!public_send("age#{person_num}_known")&.zero? |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def process_postcode_changes! |
|
|
|
|
self.postcode_full = upcase_and_remove_whitespace(postcode_full) |
|
|
|
|
process_postcode(postcode_full, "postcode_known", "is_la_inferred", "la") |
|
|
|
|