Browse Source

Extract method;

pull/166/head
Kat 4 years ago
parent
commit
c21da20a1a
  1. 7
      app/models/case_log.rb

7
app/models/case_log.rb

@ -213,7 +213,12 @@ private
self.lettype = "#{renttype} #{needstype} #{owning_organisation['Org type']}" if renttype.present? && needstype.present? && owning_organisation["Org type"].present?
self.is_la_inferred = false if is_la_inferred.nil?
self.la = get_la(property_postcode)
self.totchild = [relat2, relat3, relat4, relat5, relat6, relat7, relat8].count("Child - includes young adult and grown-up")
self.totchild = get_totchild
end
def get_totchild
relationships = [relat2, relat3, relat4, relat5, relat6, relat7, relat8]
relationships.count("Child - includes young adult and grown-up")
end
def get_la(postcode)

Loading…
Cancel
Save